♻️ Refactor backend
This commit is contained in:
@ -9,7 +9,7 @@ import {
|
||||
getHistory,
|
||||
getClasses,
|
||||
} from "./api/index.js";
|
||||
import { Auth } from "./api/auth.js";
|
||||
import auth from "./api/auth.js";
|
||||
import { Parser } from "./parser/index.js";
|
||||
|
||||
// Check DSB Mobile credentials are supplied
|
||||
@ -34,7 +34,6 @@ new Parser(
|
||||
);
|
||||
|
||||
// Create new Auth class to store sessions
|
||||
const auth = new Auth();
|
||||
app.post("/login", auth.login);
|
||||
// Check login for every API request
|
||||
app.use("/api", auth.checkLogin);
|
||||
|
Reference in New Issue
Block a user