mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-10 17:04:49 +08:00
added previous name to log
This commit is contained in:
parent
ba493b2009
commit
6e2a680388
1 changed files with 6 additions and 1 deletions
|
@ -47,8 +47,13 @@ class UserController {
|
|||
message:
|
||||
"Username invalid. Name cannot contain special characters or contain more than 14 characters. Can include _ . and -",
|
||||
});
|
||||
let olduser = await UsersDAO.getUser(uid);
|
||||
await UsersDAO.updateName(uid, name);
|
||||
Logger.log("user_name_updated", `changed name to ${name}`, uid);
|
||||
Logger.log(
|
||||
"user_name_updated",
|
||||
`changed name from ${olduser.name} to ${name}`,
|
||||
uid
|
||||
);
|
||||
return res.sendStatus(200);
|
||||
} catch (e) {
|
||||
return next(e);
|
||||
|
|
Loading…
Reference in a new issue