VueRouter, Pinia state management, add pages, design preferences page

This commit is contained in:
2024-09-05 17:47:02 +02:00
parent 8b1a396f68
commit 4d1eec023d
20 changed files with 424 additions and 95 deletions

View File

@@ -11,7 +11,7 @@ api.get("/", (req: Request, res: Response, next: NextFunction) => {
res.send("Hello World!")
})
api.post("/resetdatabase", (req: Request, res: Response, next: NextFunction) => {
api.get("/resetdatabase", (req: Request, res: Response, next: NextFunction) => {
// Step 1: Delete all data tables
Category.destroy({ truncate: true })
OrderedItem.destroy({ truncate: true })
@@ -76,5 +76,5 @@ api.post("/resetdatabase", (req: Request, res: Response, next: NextFunction) =>
]
)
res.send("Success")
res.status(200).send()
})