feat(vocab): add hard status management for SRS items and update related logic

This commit is contained in:
Torsten Schulz (local)
2026-08-20 15:17:11 +02:00
parent 2c0944ae2c
commit 3a0945734f
10 changed files with 181 additions and 263 deletions

View File

@@ -43,10 +43,16 @@ class VocabController {
this.getCourseSrsDue = this._wrapWithUser((userId, req) =>
this.service.getCourseSrsDue(userId, req.params.courseId, req.query)
);
this.getCourseHardSrsItems = this._wrapWithUser((userId, req) =>
this.service.getCourseHardSrsItems(userId, req.params.courseId)
);
this.reviewSrsItem = this._wrapWithUser((userId, req) =>
this.service.reviewSrsItem(userId, req.body),
{ successStatus: 201 }
);
this.clearSrsItemHardStatus = this._wrapWithUser((userId, req) =>
this.service.clearSrsItemHardStatus(userId, req.body)
);
this.getCourseByShareCode = this._wrapWithUser((userId, req) => this.service.getCourseByShareCode(userId, req.body.shareCode));
this.updateCourse = this._wrapWithUser((userId, req) => this.service.updateCourse(userId, req.params.courseId, req.body));
this.deleteCourse = this._wrapWithUser((userId, req) => this.service.deleteCourse(userId, req.params.courseId));