mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-15 01:56:18 +08:00
cloning request body instead of referencing
This commit is contained in:
parent
e512eeb149
commit
ef5ebe6eb9
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ class ResultController {
|
|||
|
||||
static async addResult(req: MonkeyTypes.Request): Promise<MonkeyResponse> {
|
||||
const { uid } = req.ctx.decodedToken;
|
||||
const { result } = req.body;
|
||||
const result = Object.assign({}, req.body.result);
|
||||
result.uid = uid;
|
||||
if (result.wpm === result.raw && result.acc !== 100) {
|
||||
const status = MonkeyStatusCodes.RESULT_DATA_INVALID;
|
||||
|
|
Loading…
Add table
Reference in a new issue