0
0
Fork 0

Fix endpoint response

This commit is contained in:
Oliver-Akins 2023-02-19 20:58:34 -07:00
parent 7ae0b42f3e
commit a639e7c1ae

View file

@ -1,5 +1,5 @@
import { config, database } from "$/main";
import { ServerRoute } from "@hapi/hapi"; import { ServerRoute } from "@hapi/hapi";
import { database } from "$/main";
import Joi from "joi"; import Joi from "joi";
const route: ServerRoute = { const route: ServerRoute = {
@ -15,7 +15,7 @@ const route: ServerRoute = {
const { channel } = request.params; const { channel } = request.params;
let { current, incorrect } = await database.getChannel(channel); let { current, incorrect } = await database.getChannel(channel);
return { current, incorrect }; return `${current} (incorrect: ${incorrect}/${config.game.max_incorrect})`;;
}, },
}; };
export default route; export default route;