33 lines
645 B
JavaScript
33 lines
645 B
JavaScript
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");
|
|
});
|