mirror of
https://github.com/shiroikitsu8/Bayshore_6r_legacy.git
synced 2024-11-28 09:20:54 +01:00
fix ghost stamp bug
This commit is contained in:
parent
0a64596ae1
commit
814f1882d8
@ -110,10 +110,29 @@ export default class GhostModule extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
// Get all of the friend cars for the carId provided
|
||||
// Get all of the challenger car for the carId provided except beated car
|
||||
let checkBeatedCar = await prisma.carStampTarget.findMany({
|
||||
where: {
|
||||
stampTargetCarId: body.carId,
|
||||
recommended: false
|
||||
},
|
||||
orderBy:{
|
||||
carId: 'asc'
|
||||
}
|
||||
});
|
||||
|
||||
let arrChallengerCarId = [];
|
||||
for(let i=0; i<checkBeatedCar.length; i++)
|
||||
{
|
||||
arrChallengerCarId.push(checkBeatedCar[i].carId);
|
||||
}
|
||||
|
||||
let challengers = await prisma.carChallenger.findMany({
|
||||
where: {
|
||||
carId: body.carId
|
||||
carId: body.carId,
|
||||
NOT: {
|
||||
challengerCarId: { in: arrChallengerCarId }, // Except beated challenger id
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -990,7 +990,8 @@ export default class TerminalModule extends Module {
|
||||
// Unlock all of the stamp targets for the car
|
||||
await prisma.carStampTarget.updateMany({
|
||||
where: {
|
||||
stampTargetCarId: body.carId
|
||||
stampTargetCarId: body.carId,
|
||||
recommended: true
|
||||
},
|
||||
data: {
|
||||
locked: false
|
||||
@ -1007,7 +1008,8 @@ export default class TerminalModule extends Module {
|
||||
await prisma.carStampTarget.updateMany({
|
||||
where: {
|
||||
carId: targetCar,
|
||||
stampTargetCarId: body.carId
|
||||
stampTargetCarId: body.carId,
|
||||
recommended: true
|
||||
},
|
||||
data: {
|
||||
locked: true
|
||||
|
Loading…
Reference in New Issue
Block a user