|
|
@ -44,7 +44,12 @@ router.get("/whoami", async function (req, res, next) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
router.put("/", async function (req, res, next) {
|
|
|
|
router.put("/", async function (req, res, next) {
|
|
|
|
res.send(formatResponse(0, "", await updateUserInfoService(req.body)))
|
|
|
|
const {
|
|
|
|
|
|
|
|
token,
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
} = await updateUserInfoService(req.body)
|
|
|
|
|
|
|
|
res.setHeader("authentication", token)
|
|
|
|
|
|
|
|
res.send(formatResponse(0, "", data))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = router;
|
|
|
|
module.exports = router;
|