add: edit support on masto api

This commit is contained in:
Mar0xy 2023-09-25 19:33:55 +02:00
parent 0d013ff54f
commit f1c827b815
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 62 additions and 5 deletions

View file

@ -800,13 +800,14 @@ export class MastodonApiServerService {
const accessTokens = _request.headers.authorization;
const client = getClient(BASE_URL, accessTokens);
try {
const data = await client.updateMedia(convertId(_request.params.id, IdType.SharkeyId), _request.body as any);
const data = await client.updateMedia(convertId(_request.params.id, IdType.SharkeyId), _request.body!);
reply.send(convertAttachment(data.data));
} catch (e: any) {
/* console.error(e); */
reply.code(401).send(e.response.data);
}
});
NoteEndpoint.updateStatus();
// DELETE Endpoint
NoteEndpoint.deleteStatus();