From 8ff07b212753694c1b7f34cc72fd9bc836977a5a Mon Sep 17 00:00:00 2001 From: chapel Date: Sat, 19 Nov 2011 14:25:09 -0800 Subject: [PATCH] Missed some not found errors --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.25.1