mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-15 12:55:47 +00:00
Update load-user.js
This commit is contained in:
parent
de925c2aa5
commit
15fccf45e8
1 changed files with 1 additions and 3 deletions
|
|
@ -14,11 +14,9 @@ module.exports = async (request, response, next) => {
|
|||
}
|
||||
|
||||
try {
|
||||
const userData = await loadJsonFile(path.join(__dirname, '..', 'users', `${response.locals.id}.json`))
|
||||
|
||||
response.locals.user = {
|
||||
...response.locals.user,
|
||||
...userData
|
||||
...await loadJsonFile(path.join(__dirname, '..', 'users', `${response.locals.id}.json`))
|
||||
}
|
||||
} catch ({ code, message }) {
|
||||
if (code !== 'ENOENT') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue