Refactor, change response type to json in update-api user online checking

Signed-off-by: James Tsai <jamesscamel@gmail.com>
This commit is contained in:
James Tsai 2020-07-30 18:55:36 +08:00
parent 04fe74d520
commit 091c77bdb1
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ const updateNote = async (req, res) => {
if (realtime.isNoteExistsInPool(noteId)) {
logger.error('Update note failed: There are online users opening this note.')
return res.status('403').send({ status: 'error', message: 'Update API can only be used when no users is online' })
return res.status('403').json({ status: 'error', message: 'Update API can only be used when no users is online' })
}
const now = Date.now()