wip version of the api
This commit is contained in:
parent
c24967dc74
commit
7d80b20390
8 changed files with 61 additions and 3 deletions
8
apps/api/src/controllers/gameController.ts
Normal file
8
apps/api/src/controllers/gameController.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import type { Request, Response } from "express";
|
||||
import { prepareQuestions } from "../services/gameService.js";
|
||||
|
||||
export const getGame = async (req: Request, res: Response) => {
|
||||
const query = gameRequestSchema.parse(req.query);
|
||||
const questions = await prepareQuestions(query);
|
||||
res.json({ success: true, data: questions });
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue