Minor changes

This commit is contained in:
Stefan-5422
2022-03-28 11:58:32 +02:00
committed by Stefan
parent 68b9044a9d
commit 43bb7baa88
2 changed files with 1076 additions and 53 deletions
+1073 -50
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -20,10 +20,10 @@ export const getAllEvents = async (req: Request, res: Response) => {
export const getEvent = async (req: Request, res: Response) => { export const getEvent = async (req: Request, res: Response) => {
const eventId = req.params.eventId; const eventId = req.params.eventId;
if (eventId === undefined || null) { if (typeof eventId !== "string") {
res.status(400).json( res.status(400).json(
generateInvalidBodyError({ generateInvalidBodyError({
eventId: DataType.STRING, eventId: DataType.UUID,
}) })
); );
return; return;
@@ -58,7 +58,7 @@ export const getEvent = async (req: Request, res: Response) => {
type: "error", type: "error",
payload: { payload: {
message: "Unknown error occurred with your request. Check if your parameters are correct", message: "Unknown error occurred with your request. Check if your parameters are correct",
shema: { schema: {
eventId: DataType.UUID, eventId: DataType.UUID,
}, },
}, },