protcol table services

This commit is contained in:
Julian Krauser 2024-10-11 14:44:09 +02:00
parent dd74005043
commit 475a13ce36
19 changed files with 502 additions and 10 deletions

View file

@ -1,5 +1,17 @@
import express, { Request, Response } from "express";
import { getAllProtocols, getProtocolById } from "../../controller/admin/protocolController";
import {
getAllProtocols,
getProtocolAgendaById,
getProtocolById,
getProtocolDecisonsById,
getProtocolPrecenseById,
getProtocolVotingsById,
synchronizeProtocolAgendaById,
synchronizeProtocolById,
synchronizeProtocolDecisonsById,
synchronizeProtocolPrecenseById,
synchronizeProtocolVotingsById,
} from "../../controller/admin/protocolController";
var router = express.Router({ mergeParams: true });
@ -11,4 +23,40 @@ router.get("/:id", async (req: Request, res: Response) => {
await getProtocolById(req, res);
});
router.get("/:protocolId/agenda", async (req: Request, res: Response) => {
await getProtocolAgendaById(req, res);
});
router.get("/:protocolId/decisions", async (req: Request, res: Response) => {
await getProtocolDecisonsById(req, res);
});
router.get("/:protocolId/presence", async (req: Request, res: Response) => {
await getProtocolPrecenseById(req, res);
});
router.get("/:protocolId/votings", async (req: Request, res: Response) => {
await getProtocolVotingsById(req, res);
});
router.get("/:id/synchronize", async (req: Request, res: Response) => {
await synchronizeProtocolById(req, res);
});
router.get("/:protocolId/synchronize/agenda", async (req: Request, res: Response) => {
await synchronizeProtocolAgendaById(req, res);
});
router.get("/:protocolId/synchronize/decisions", async (req: Request, res: Response) => {
await synchronizeProtocolDecisonsById(req, res);
});
router.get("/:protocolId/synchronize/presence", async (req: Request, res: Response) => {
await synchronizeProtocolPrecenseById(req, res);
});
router.get("/:protocolId/synchronize/votings", async (req: Request, res: Response) => {
await synchronizeProtocolVotingsById(req, res);
});
export default router;