diff --git a/ebs/src/index.ts b/ebs/src/index.ts index d25d1b7..8eb6c8a 100644 --- a/ebs/src/index.ts +++ b/ebs/src/index.ts @@ -30,6 +30,7 @@ async function main() { require("./modules/config"); require("./modules/transactions"); require("./modules/game"); + require("./modules/twitch"); const { setIngame } = require("./modules/config"); diff --git a/ebs/src/modules/twitch.ts b/ebs/src/modules/twitch.ts new file mode 100644 index 0000000..1dd63a5 --- /dev/null +++ b/ebs/src/modules/twitch.ts @@ -0,0 +1,7 @@ +import { app } from ".."; +import { asyncCatch } from "../util/middleware"; +import { getHelixUser } from "../util/twitch"; + +app.get("/private/user/:id", asyncCatch(async (req, res) => { + res.json(await getHelixUser(req.params["id"])); +}));