mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
mediaDescriptionUpdateSchema --> mediaUpdateSchema
This commit is contained in:
parent
7e711aa8a8
commit
1a38061b34
1 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ const mediaBodySchema = z.object({
|
|||
focus: z.string().optional(),
|
||||
});
|
||||
|
||||
const mediaDescriptionUpdateSchema = z.object({
|
||||
const mediaUpdateSchema = z.object({
|
||||
description: z.string(),
|
||||
});
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ const mediaController: AppController = async (c) => {
|
|||
};
|
||||
|
||||
const updateMediaController: AppController = async (c) => {
|
||||
const result = mediaDescriptionUpdateSchema.safeParse(await parseBody(c.req.raw));
|
||||
const result = mediaUpdateSchema.safeParse(await parseBody(c.req.raw));
|
||||
if (!result.success) {
|
||||
return c.json({ error: 'Bad request.', schema: result.error }, 422);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue