Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

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 21, 2023
1 parent f9627bc commit e4461c3
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 e4461c3

Please sign in to comment.