mirror of
https://github.com/shiroikitsu8/Bayshore_6r_legacy.git
synced 2025-01-19 15:28:42 +01:00
Merge pull request #13 from ghkkk090/master
add error handling if itemIdVal is 0
This commit is contained in:
commit
32883c9884
@ -421,15 +421,17 @@ export default class GameModule extends Module {
|
||||
itemIdVal = 28;
|
||||
}
|
||||
|
||||
console.log(`carID ${body.carId} do n*100 play, continue give reward... meter ID ${itemIdVal}`);
|
||||
await prisma.carItem.create({
|
||||
data: {
|
||||
carId: body.carId,
|
||||
category: 15,
|
||||
itemId: itemIdVal,
|
||||
amount: 1
|
||||
}
|
||||
});
|
||||
if(itemIdVal !== 0){
|
||||
console.log(`carID ${body.carId} do n*100 play, continue give reward... meter ID ${itemIdVal}`);
|
||||
await prisma.carItem.create({
|
||||
data: {
|
||||
carId: body.carId,
|
||||
category: 15,
|
||||
itemId: itemIdVal,
|
||||
amount: 1
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Update user
|
||||
|
Loading…
x
Reference in New Issue
Block a user