mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
updateMediaDescriptionController --> updateMediaController
This commit is contained in:
parent
f8fae52d5e
commit
7e711aa8a8
2 changed files with 4 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ import {
|
|||
instanceV2Controller,
|
||||
} from '@/controllers/api/instance.ts';
|
||||
import { markersController, updateMarkersController } from '@/controllers/api/markers.ts';
|
||||
import { mediaController, updateMediaDescriptionController } from '@/controllers/api/media.ts';
|
||||
import { mediaController, updateMediaController } from '@/controllers/api/media.ts';
|
||||
import { mutesController } from '@/controllers/api/mutes.ts';
|
||||
import { notificationsController } from '@/controllers/api/notifications.ts';
|
||||
import { createTokenController, oauthAuthorizeController, oauthController } from '@/controllers/api/oauth.ts';
|
||||
|
|
@ -228,7 +228,7 @@ app.get('/api/v1/pleroma/statuses/:id{[0-9a-f]{64}}/quotes', quotesController);
|
|||
app.post('/api/v1/media', mediaController);
|
||||
app.put(
|
||||
'/api/v1/media/:id{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}',
|
||||
updateMediaDescriptionController,
|
||||
updateMediaController,
|
||||
);
|
||||
app.post('/api/v2/media', mediaController);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const mediaController: AppController = async (c) => {
|
|||
}
|
||||
};
|
||||
|
||||
const updateMediaDescriptionController: AppController = async (c) => {
|
||||
const updateMediaController: AppController = async (c) => {
|
||||
const result = mediaDescriptionUpdateSchema.safeParse(await parseBody(c.req.raw));
|
||||
if (!result.success) {
|
||||
return c.json({ error: 'Bad request.', schema: result.error }, 422);
|
||||
|
|
@ -55,4 +55,4 @@ const updateMediaDescriptionController: AppController = async (c) => {
|
|||
return c.json({ message: 'ok' }, 200);
|
||||
};
|
||||
|
||||
export { mediaController, updateMediaDescriptionController };
|
||||
export { mediaController, updateMediaController };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue