Merge branch 'main' of https://gitea.marc-wieland.de/mrcwlnd/volleyball-dev-backend
This commit is contained in:
commit
bb83f51b05
4
index.js
4
index.js
@ -806,10 +806,9 @@ const storage = multer.diskStorage({
|
||||
|
||||
const upload = multer({ storage });
|
||||
|
||||
router.post("/api/teams/:id/carousel-upload", upload.single("image"), (req, res) => {
|
||||
app.post("/api/teams/:id/carousel-upload", upload.single("image"), (req, res) => {
|
||||
if (!req.file) return res.status(400).json({ error: "Keine Datei hochgeladen" });
|
||||
|
||||
// z. B. /uploads/carousel/171654543-name.jpg
|
||||
const filePath = `/uploads/carousel/${req.file.filename}`;
|
||||
res.json({ path: filePath });
|
||||
});
|
||||
@ -962,6 +961,7 @@ app.delete("/api/events/:id", async (req, res) => {
|
||||
|
||||
|
||||
|
||||
|
||||
// Server starten
|
||||
app.listen(port, () => {
|
||||
const nets = os.networkInterfaces();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user