added route to fetch todays schedule
This commit is contained in:
@@ -2,6 +2,31 @@ import express from "express";
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get("/api/today", (req, res) => {
|
||||
const userLink = req.query.userLink;
|
||||
|
||||
// Simulate fetching today's schedule
|
||||
const todaySchedule = {
|
||||
day: "Montag",
|
||||
lessons: [
|
||||
{
|
||||
period: "1.",
|
||||
time_start: "08:00",
|
||||
time_end: "08:55",
|
||||
room: "255",
|
||||
subject: "D",
|
||||
group: "G2",
|
||||
teacher: "VanC",
|
||||
color: "pink",
|
||||
day: "Montag",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
console.log(`Fetching schedule for user: ${userLink}`);
|
||||
res.json(todaySchedule);
|
||||
});
|
||||
|
||||
app.listen(8001, () => {
|
||||
console.log("Server is running on port 8001");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user