1
0
mirror of synced 2025-02-02 04:37:59 +01:00

regionid must not 0

This commit is contained in:
Shiroi Kitsu 2023-02-20 11:21:11 +07:00
parent 035410daec
commit aff6e38000

View File

@ -25,10 +25,13 @@ export default class ResourceModule extends Module {
// Empty list of place records
let places: wm.wm.protobuf.Place[] = [];
// Region ID must not 0
let regionId = common.sanitizeInputNotZero(Number(Config.getConfig().regionId)) || 1;
// Response data
places.push(new wm.wm.protobuf.Place({
placeId: Config.getConfig().placeId || 'JPN0123',
regionId: Number(Config.getConfig().regionId) || 1,
regionId: regionId,
shopName: Config.getConfig().shopName || 'Bayshore',
country: Config.getConfig().country || 'JPN'
}));
@ -46,7 +49,7 @@ export default class ResourceModule extends Module {
await prisma.placeList.create({
data:{
placeId: Config.getConfig().placeId || 'JPN0123',
regionId: Number(Config.getConfig().regionId) || 1,
regionId: regionId,
shopName: Config.getConfig().shopName || 'Bayshore',
country: Config.getConfig().country || 'JPN'
}
@ -61,7 +64,7 @@ export default class ResourceModule extends Module {
id: checkPlaceList.id
},
data:{
regionId: Number(Config.getConfig().regionId),
regionId: regionId,
shopName: Config.getConfig().shopName,
country: Config.getConfig().country
}