From 1b7953f688daaa83a4cde81f4aad5121fdb76f7a Mon Sep 17 00:00:00 2001 From: Shiroi Kitsu <108461408+shiroikitsu8@users.noreply.github.com> Date: Sun, 27 Nov 2022 19:25:23 +0700 Subject: [PATCH] Update terminal.ts --- src/modules/terminal.ts | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/modules/terminal.ts b/src/modules/terminal.ts index 53728fd..5b34157 100644 --- a/src/modules/terminal.ts +++ b/src/modules/terminal.ts @@ -1006,6 +1006,25 @@ export default class TerminalModule extends Module { common.sendResponse(message, res); }); + + // Save Screenshoot + 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) => { @@ -1026,24 +1045,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