Fix endpoint response
This commit is contained in:
parent
7ae0b42f3e
commit
a639e7c1ae
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue