1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2024-11-28 01:11:00 +01:00

fix broken gtWing saving

This commit is contained in:
Shiroi Kitsu 2023-01-03 09:13:01 +07:00
parent b58c730e5d
commit 70f4455784
2 changed files with 27 additions and 19 deletions

View File

@ -1021,6 +1021,24 @@ export default class TerminalModule extends Module {
});
app.post('/method/save_screenshot', async (req, res) => {
// Get the information from the request
let body = wm.wm.protobuf.SaveScreenshotRequest.decode(req.body);
// Response data
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
};
// Encode the response
let message = wm.wm.protobuf.SaveScreenshotResponse.encode(msg);
// Send the response to the client
common.sendResponse(message, res);
});
/*
app.post('/method/load_unreceived_user_items', async (req, res) => {
@ -1040,24 +1058,6 @@ export default class TerminalModule extends Module {
})
app.post('/method/save_screenshot', async (req, res) => {
// Get the information from the request
let body = wm.wm.protobuf.SaveScreenshotRequest.decode(req.body);
// Response data
let msg = {
error: wmsrv.wm.protobuf.ErrorCode.ERR_SUCCESS,
};
// Encode the response
let message = wmsrv.wm.protobuf.SaveScreenshotResponse.encode(msg);
// Send the response to the client
common.sendResponse(message, res);
})
app.post('/method/check_item_receivable_cars', async (req, res) => {
// Get the information from the request

View File

@ -134,10 +134,18 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
data: {
...dataGhost,
...dataCar,
...dataCarGTWing,
}
});
await prisma.carGTWing.update({
where: {
dbId: body.carId
},
data:{
...dataCarGTWing,
}
});
// --------------GHOST BATTLE SELECTION MODE--------------
// Calling save ghost history battle function (BASE_PATH/src/util/games/games_util/ghost_history.ts)