Skip to content

Commit 37d9464

Browse files
committed
student not allowed to enroll if no seat left
1 parent 7af92b9 commit 37d9464

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

models/section/section.model.server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function findSectionsForCourse(courseId) {
1111
}
1212

1313
function decrementSectionSeats(sectionId) {
14+
1415
return sectionModel.update({
1516
_id: sectionId
1617
}, {

services/section.service.server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = function (app) {
5050
section: sectionId
5151
};
5252

53+
5354
sectionModel
5455
.decrementSectionSeats(sectionId)
5556
.then(function () {

0 commit comments

Comments
 (0)