mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +02:00
Minor changes
This commit is contained in:
Generated
+1073
-50
File diff suppressed because it is too large
Load Diff
@@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user