mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 14:39:29 +02:00
Resource update working
This commit is contained in:
parent
9fa25fb0fd
commit
682210c46f
5 changed files with 15 additions and 16 deletions
|
@ -11,7 +11,7 @@ import logger from '@server/logger';
|
|||
|
||||
// Define Zod schema for request parameters validation
|
||||
const deleteResourceSchema = z.object({
|
||||
resourceId: z.string().uuid()
|
||||
resourceId: z.string()
|
||||
});
|
||||
|
||||
export async function deleteResource(req: Request, res: Response, next: NextFunction): Promise<any> {
|
||||
|
|
|
@ -70,7 +70,7 @@ export async function getResource(req: Request, res: Response, next: NextFunctio
|
|||
status: HttpCode.OK,
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
throw error;
|
||||
return next(createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "An error occurred..."));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import logger from '@server/logger';
|
|||
|
||||
// Define Zod schema for request parameters validation
|
||||
const updateResourceParamsSchema = z.object({
|
||||
resourceId: z.string().uuid()
|
||||
resourceId: z.string()
|
||||
});
|
||||
|
||||
// Define Zod schema for request body validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue