From a639e7c1ae2109e6ea8c0c5c92751b614c518e73 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 19 Feb 2023 20:58:34 -0700 Subject: [PATCH] Fix endpoint response --- src/endpoints/view_game_state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/view_game_state.ts b/src/endpoints/view_game_state.ts index 16bb104..1a68a47 100644 --- a/src/endpoints/view_game_state.ts +++ b/src/endpoints/view_game_state.ts @@ -1,5 +1,5 @@ +import { config, database } from "$/main"; import { ServerRoute } from "@hapi/hapi"; -import { database } from "$/main"; import Joi from "joi"; const route: ServerRoute = { @@ -15,7 +15,7 @@ const route: ServerRoute = { const { channel } = request.params; let { current, incorrect } = await database.getChannel(channel); - return { current, incorrect }; + return `${current} (incorrect: ${incorrect}/${config.game.max_incorrect})`;; }, }; export default route; \ No newline at end of file