From: xangelo Date: Tue, 4 Jul 2023 15:19:05 +0000 (-0400) Subject: refactor: give socket event default `Promise` to prep for testing X-Git-Tag: v0.0.1~3 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=601f1a055b65f382a43412ddd01ac85701622f16;p=risinglegends.git refactor: give socket event default `Promise` to prep for testing --- diff --git a/src/events/profession-changing/server.ts b/src/events/profession-changing/server.ts index c57156a..7662557 100644 --- a/src/events/profession-changing/server.ts +++ b/src/events/profession-changing/server.ts @@ -8,7 +8,7 @@ const MIN_LEVEL = 25; export const professionRecruiter: SocketEvent = { eventName: EVENT_NAME, - handler: (api, data) => { + handler: (api, data): Promise => { let text: string = ''; @@ -64,6 +64,8 @@ export const professionRecruiter: SocketEvent = { api.socket.emit('city:services:profession_recruitor_windcross', { text }); + + return; } }; diff --git a/src/server/socket-event.server.ts b/src/server/socket-event.server.ts index 3206e00..a2711f0 100644 --- a/src/server/socket-event.server.ts +++ b/src/server/socket-event.server.ts @@ -10,5 +10,5 @@ export type API = { export type SocketEvent = { eventName: string; - handler: (api: API, data: unknown) => void; + handler: (api: API, data: unknown) => Promise; }