upd: add history endpoint, make sure all areas use new convertAccount

This commit is contained in:
Mar0xy 2023-10-29 12:18:18 +01:00
parent 8fd669ff7d
commit c53323d237
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
6 changed files with 104 additions and 28 deletions

View file

@ -74,7 +74,8 @@ export class ApiStatusMastodon {
public async getHistory() {
this.fastify.get<{ Params: { id: string } }>('/v1/statuses/:id/history', async (_request, reply) => {
try {
reply.send([]);
const edits = await this.mastoconverter.getEdits(_request.params.id);
reply.send(edits);
} catch (e: any) {
console.error(e);
reply.code(401).send(e.response.data);