ff-admin-server/src/routes/public.ts

54 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-10-27 11:47:13 +01:00
import express from "express";
2025-04-24 16:49:16 +02:00
import {
checkScannerRoomExists,
2025-07-16 12:24:50 +02:00
createDamageReport,
2025-04-24 16:49:16 +02:00
getApplicationConfig,
getApplicationFavicon,
getApplicationIcon,
getApplicationLogo,
getApplicationManifest,
getCalendarItemsByTypes,
2025-07-16 12:24:50 +02:00
searchStuffByCode,
2025-04-24 16:49:16 +02:00
} from "../controller/publicController";
2025-07-16 12:24:50 +02:00
import { pDamageReportFileUpload } from "../middleware/multer";
2024-10-27 11:47:13 +01:00
var router = express.Router({ mergeParams: true });
router.get("/calendar", async (req, res) => {
await getCalendarItemsByTypes(req, res);
});
2025-07-16 12:24:50 +02:00
router.get("/reportdamage", async (req, res) => {
await searchStuffByCode(req, res);
});
router.post("/reportdamage", pDamageReportFileUpload, async (req, res) => {
await createDamageReport(req, res);
2025-05-29 10:52:05 +02:00
});
router.post("/checkscannerroom", async (req, res) => {
await checkScannerRoomExists(req, res);
});
2025-04-20 16:15:27 +02:00
router.get("/configuration", async (req, res) => {
await getApplicationConfig(req, res);
});
2025-04-24 16:49:16 +02:00
router.get("/manifest.webmanifest", async (req, res) => {
await getApplicationManifest(req, res);
});
router.get("/applogo.png", async (req, res) => {
await getApplicationLogo(req, res);
});
router.get("/favicon.ico", async (req, res) => {
await getApplicationFavicon(req, res);
});
router.get("/icon.png", async (req, res) => {
await getApplicationIcon(req, res);
});
2024-10-27 11:47:13 +01:00
export default router;