feat: new jumbotron page for dm hall screen

This commit is contained in:
2023-12-02 18:24:05 +01:00
parent 036a0820f9
commit babf668a2f
11 changed files with 292 additions and 1 deletions
+6
View File
@@ -14,6 +14,7 @@ import {
createSolution,
deleteProblem,
deleteSolution,
getJumbotronProblem,
getProblem,
getProblems,
getSolution,
@@ -140,6 +141,11 @@ export async function createApiRouter(): Promise<[Router, DatabaseConnection]> {
res.json(users)
})
r.get('/api/jumbotron', async (req, res) => {
const problem = await getJumbotronProblem(db)
res.json(problem)
})
r.get('/api/problems', async (req, res) => {
type ProblemWithSolutionsCount = ProblemModel & { solutionsCount?: number }