Use Vue-based login page

This commit is contained in:
2022-05-05 14:39:41 +02:00
parent 825f9fcd50
commit 64196eeab2
8 changed files with 80 additions and 77 deletions

View File

@ -29,13 +29,16 @@ const parser = new Parser(
);
app.post("/login", auth.login);
app.use(auth.checkLogin);
app.use("/api", auth.checkLogin);
app.get("/api/check", (_req, res) => {
res.sendStatus(200);
});
app.get("/api/timetable", getTimetable);
app.get("/api/substitutions", getSubstitutions);
app.get("/api/history", getHistory);
app.get("/api/classes", getClasses);
app.get("/api/*", (req, res) => {
app.get("/api/*", (_req, res) => {
res.sendStatus(400);
});