瀏覽代碼

Minor fix

pull/43/head
Djordje Djoric 3 年之前
父節點
當前提交
446807931c
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. 5
    5
      src/endpoints/user.js

+ 5
- 5
src/endpoints/user.js 查看文件

@@ -25,7 +25,7 @@ const getUser = async (req, res, next) => {

return res.json(user)
} catch (e) {
return res.status(404).send('User not found!')
next(e)
}
}

@@ -47,7 +47,7 @@ const createUser = async (req, res, next) => {

return res.status(201).json(newUser)
} catch (e) {
return res.status(500).send(e.message)
next(e)
}
}

@@ -76,7 +76,7 @@ const updateUser = async (req, res, next) => {

return res.status(200).send('User updated successfully')
} catch (e) {
return res.status(500).send(e.message)
next(e)
}
}

@@ -91,7 +91,7 @@ const updateUserContacts = async (req, res, next) => {
}
return res.status(200).send('user contacts updated successfully')
} catch (e) {
return res.status(500).send(e.message)
next(e)
}
}

@@ -111,7 +111,7 @@ const deleteUser = async (req, res, next) => {

return res.status(204).send('Deleting user with id of ' + id)
} catch (e) {
return res.status(500).send(e.message)
next(e)
}
}


Loading…
取消
儲存