sync and create change

This commit is contained in:
Julian Krauser 2024-10-15 16:25:42 +02:00
parent 5f434c943e
commit e1ad491e68
16 changed files with 285 additions and 39 deletions

View file

@ -1,6 +1,9 @@
import express, { Request, Response } from "express";
import {
createProtocol,
createProtocolAgendaById,
createProtocolDecisonsById,
createProtocolVotingsById,
getAllProtocols,
getProtocolAgendaById,
getProtocolById,
@ -44,24 +47,36 @@ router.post("/", async (req: Request, res: Response) => {
await createProtocol(req, res);
});
router.put("/:id/synchronize", async (req: Request, res: Response) => {
router.post("/:protocolId/agenda", async (req: Request, res: Response) => {
await createProtocolAgendaById(req, res);
});
router.post("/:protocolId/decision", async (req: Request, res: Response) => {
await createProtocolDecisonsById(req, res);
});
router.post("/:protocolId/voting", async (req: Request, res: Response) => {
await createProtocolVotingsById(req, res);
});
router.patch("/:id/synchronize", async (req: Request, res: Response) => {
await synchronizeProtocolById(req, res);
});
router.put("/:protocolId/synchronize/agenda", async (req: Request, res: Response) => {
router.patch("/:protocolId/synchronize/agenda", async (req: Request, res: Response) => {
await synchronizeProtocolAgendaById(req, res);
});
router.put("/:protocolId/synchronize/decisions", async (req: Request, res: Response) => {
router.patch("/:protocolId/synchronize/decisions", async (req: Request, res: Response) => {
await synchronizeProtocolDecisonsById(req, res);
});
router.patch("/:protocolId/synchronize/votings", async (req: Request, res: Response) => {
await synchronizeProtocolVotingsById(req, res);
});
router.put("/:protocolId/synchronize/presence", async (req: Request, res: Response) => {
await synchronizeProtocolPrecenseById(req, res);
});
router.put("/:protocolId/synchronize/votings", async (req: Request, res: Response) => {
await synchronizeProtocolVotingsById(req, res);
});
export default router;