[F] Use scoreId instead of assignmentId when requesting
This commit is contained in:
@@ -33,13 +33,13 @@ export default class OverallCourse extends Vue
|
|||||||
*/
|
*/
|
||||||
markAsRead(assignment: Assignment)
|
markAsRead(assignment: Assignment)
|
||||||
{
|
{
|
||||||
App.http.post('/mark-as-read', {csrf: App.http.csrf, scoreId: assignment.id})
|
App.http.post('/mark-as-read', {csrf: App.http.csrf, scoreId: assignment.scoreId})
|
||||||
.then(response =>
|
.then(response =>
|
||||||
{
|
{
|
||||||
// Check success
|
// Check success
|
||||||
if (response.success)
|
if (response.success)
|
||||||
{
|
{
|
||||||
this.unreadAssignments = this.unreadAssignments.filter(a => a.id == assignment.id);
|
this.unreadAssignments = this.unreadAssignments.filter(a => a == assignment);
|
||||||
this.unread = this.unreadAssignments.length;
|
this.unread = this.unreadAssignments.length;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user