Implementing Exercise system in database with API and frontend visualization

This commit is contained in:
2024-10-07 13:15:16 +02:00
parent 4a62c7a96b
commit f81e9be320
20 changed files with 413 additions and 99 deletions

View File

@@ -7,12 +7,12 @@ api.get("/", (req: Request, res: Response, next: NextFunction) => {
res.status(200).send()
})
api.get("/resetdatabase", (req: Request, res: Response, next: NextFunction) => {
api.get("/resetdatabase", async (req: Request, res: Response, next: NextFunction) => {
// Step 1: Delete all data tables
deleteAllTables()
// Step 2: Prepopulate with default values
prepopulateDatabase()
await prepopulateDatabase()
// Step 3: Send status back
res.status(200).send()