mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 22:06:38 +00:00
Resource update working
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user