feat: new jumbotron page for dm hall screen
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user