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

Commit

Permalink
fix!: fix course detail page url bug
Browse files Browse the repository at this point in the history
fix course detail page url as after creating a course, its detail page was not accessible and showing nothing, its url was mismatching and it is fixed by adding the trailing slash "/" to the url
  • Loading branch information
Muhammad Faraz Maqsood committed Sep 25, 2023
1 parent f0e196f commit 05838de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 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,9 @@ define([

return Backbone.RelationalModel.extend({
urlRoot: '/api/v2/courses/',
url: function() {
return Backbone.Model.prototype.url.call(this) + '/';
},

defaults: {
id: null,
Expand Down

0 comments on commit 05838de

Please sign in to comment.