From: chapel Date: Sat, 19 Nov 2011 22:25:09 +0000 (-0800) Subject: Missed some not found errors X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8ff07b212753694c1b7f34cc72fd9bc836977a5a;p=oweals%2Ffinalsclub.git Missed some not found errors --- diff --git a/app.js b/app.js index 62c543c..ce7010c 100644 --- a/app.js +++ b/app.js @@ -1452,7 +1452,7 @@ function loadSubject( req, res, next ) { if( url.parse( req.url ).pathname.match(/subject/) ) { ArchivedSubject.findOne({id: req.params.id }, function(err, subject) { if ( err || !subject) { - sendJson(res, {status: 'error', message: 'Subject with this ID does not exist'} ) + sendJson(res, {status: 'not_found', message: 'Subject with this ID does not exist'} ) } else { req.subject = subject; next() @@ -1467,7 +1467,7 @@ function loadOldCourse( req, res, next ) { if( url.parse( req.url ).pathname.match(/course/) ) { ArchivedCourse.findOne({id: req.params.id }, function(err, course) { if ( err || !course ) { - sendJson(res, {status: 'error', message: 'Course with this ID does not exist'} ) + sendJson(res, {status: 'not_found', message: 'Course with this ID does not exist'} ) } else { req.course = course; next()