how to remove relation for specific instances with sequelize / mysql
<p>I created a many-to-many association between courses and users like this:</p>

<pre><code>Course.belongsToMany(User, { through: 'CourseUser'});
User.belongsToMany(Course, { through: 'CourseUser'});
</code></pre>

<p>which generates a join table called CourseUser.</p>

<p>I add a relation for a specific course and user with the following server side function that happens on the click of a button:
 the userCourse variable looks like this: { UserId: 7, CourseId: 13 }</p>

<pre><code>  addUser: function(req, res) {
    var userCourse = req.body;
    db.CourseUser.create(userCourse).then(function () {
      res.sendStatus(200);
    });
  }
</code></pre>

<ol>
<li><p>Is this the correct way of adding the association between an existing user and an existing course? (if not, what is the correct way)</p></li>
<li><p>I would like to have an ability of removing the association when clicking on another button. But I can't quite figure out how to set up the function.</p></li>
</ol>