1
0
mirror of synced 2024-12-04 19:17:58 +01:00

api for ocm ranking (alpha)

This commit is contained in:
ghkkk090 2022-09-09 13:35:47 +07:00
parent e557a428ad
commit 0a64596ae1

View File

@ -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);
});