From 0a64596ae10f63672a5b0567c155ee8ad8d10389 Mon Sep 17 00:00:00 2001 From: ghkkk090 Date: Fri, 9 Sep 2022 13:35:47 +0700 Subject: [PATCH] api for ocm ranking (alpha) --- src/api.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/api.ts b/src/api.ts index b82e768..33e99ad 100644 --- a/src/api.ts +++ b/src/api.ts @@ -80,7 +80,8 @@ export default class ApiModule extends Module { // Message Response let message: any = { - cars: [] + cars: [], + lastPlayedPlace: 'Bayshore' }; // Get all of the cars matching the query @@ -102,10 +103,18 @@ export default class ApiModule extends Module { title: true, regionId: true, } - } + }, } }); + let getLastPlayedPlace = await prisma.placeList.findFirst({ + where:{ + id: message.cars[0].lastPlayedPlace + } + }) + + message.lastPlayedPlace = getLastPlayedPlace?.shopName; + // Send the response to the client res.send(message); });