From 3eeda4020a15ad46465213ad048e96dfc1e8f597 Mon Sep 17 00:00:00 2001 From: ghkkk090 Date: Tue, 13 Sep 2022 13:11:19 +0700 Subject: [PATCH] Update api.ts --- src/api.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/api.ts b/src/api.ts index 19f4045..46265ea 100644 --- a/src/api.ts +++ b/src/api.ts @@ -25,7 +25,15 @@ export default class ApiModule extends Module { version: null }; - message.version = 'v1.0.0'; + let myJSON = '{"version": "v1.0.0", "log": ['+ + '"• Fix ghost play count when retiring ocm",'+ + '"• API for ocm ranking",'+ + '"• Fix unlimited ghost stamp return (hopefully no more of this)",'+ + '"• Fix give meter reward bug if playCount still 0",'+ + '"• Hopefully fix ocm HoF bug"'+ + ']'+ + '}'; + message.version = JSON.parse(myJSON); // Send the response to the client res.send(message); @@ -173,13 +181,14 @@ export default class ApiModule extends Module { } }); - let getLastPlayedPlace = await prisma.placeList.findFirst({ + let getLastPlayedPlace = await prisma.oCMGhostBattleRecord.findFirst({ where:{ - id: message.cars[0].lastPlayedPlace + carId: message.cars[0].carId, + competitionId: competitionId } }) - message.lastPlayedPlace = getLastPlayedPlace?.shopName; + message.lastPlayedPlace = getLastPlayedPlace?.playedShopName; // Send the response to the client res.send(message);