Skip to content

Commit

Permalink
docs!: add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood authored and Muhammad Faraz Maqsood committed Nov 8, 2023
1 parent b3ec527 commit 46bd190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ecommerce/static/js/models/course_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ define([

return Backbone.RelationalModel.extend({
urlRoot: '/api/v2/courses/',
// course detail page url was not matching because of missing trailing slash,
// with thi function, trailing slash will be added to match the url
url: function() {
return Backbone.Model.prototype.url.call(this) + '/';
},
Expand Down

0 comments on commit 46bd190

Please sign in to comment.