refactor(api): ♻️ Move more API routes to new OpenAPI format

This commit is contained in:
Jesse Wierzbinski 2024-09-15 14:28:47 +02:00
parent 166d1c59a5
commit b755fc5d62
No known key found for this signature in database
14 changed files with 1037 additions and 686 deletions

View file

@ -1,8 +1,5 @@
import { proxyUrl } from "@/response";
import type {
AsyncAttachment as ApiAsyncAttachment,
Attachment as ApiAttachment,
} from "@versia/client/types";
import type { Attachment as ApiAttachment } from "@versia/client/types";
import type { ContentFormat } from "@versia/federation/types";
import {
type InferInsertModel,
@ -212,7 +209,7 @@ export class Attachment extends BaseInterface<typeof Attachments> {
};
}
public toApi(): ApiAttachment | ApiAsyncAttachment {
public toApi(): ApiAttachment {
return {
id: this.data.id,
type: this.getMastodonType(),