From 26f29cdf7905d5a6cc56ae6b2038d290434feaf1 Mon Sep 17 00:00:00 2001 From: ghkkk090 Date: Wed, 7 Sep 2022 11:31:42 +0700 Subject: [PATCH] ghost play count retiring ocm --- src/util/games/ghost.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/util/games/ghost.ts b/src/util/games/ghost.ts index cb932f0..9f0cfbd 100644 --- a/src/util/games/ghost.ts +++ b/src/util/games/ghost.ts @@ -581,6 +581,21 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ } } } + + // Ghost update data + let dataGhost = { + rgPlayCount: common.sanitizeInput(body.rgResult!.rgPlayCount), + } + + // Update the car properties + await prisma.car.update({ + where: { + carId: body.carId + }, + data: { + ...dataGhost + } + }); } // Return the value to 'BASE_PATH/src/modules/game.ts'