api for ocm ranking (alpha)
This commit is contained in:
parent
e557a428ad
commit
0a64596ae1
13
src/api.ts
13
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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user