mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
fix(api): 🐛 Don't use URL in Versia entity schemas, fixes OpenAPI
This commit is contained in:
parent
0a712128a5
commit
a2e907390f
12 changed files with 131 additions and 102 deletions
|
|
@ -118,7 +118,9 @@ export class FederationRequester {
|
|||
}
|
||||
}
|
||||
|
||||
nextUrl = collection.data.next;
|
||||
nextUrl = collection.data.next
|
||||
? new URL(collection.data.next)
|
||||
: null;
|
||||
limit -= collection.data.items.length;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +138,7 @@ export class FederationRequester {
|
|||
limit?: number;
|
||||
},
|
||||
): Promise<URL[]> {
|
||||
const entities: URL[] = [];
|
||||
const entities: string[] = [];
|
||||
let nextUrl: URL | null = url;
|
||||
let limit = options?.limit ?? Number.POSITIVE_INFINITY;
|
||||
|
||||
|
|
@ -147,11 +149,13 @@ export class FederationRequester {
|
|||
);
|
||||
|
||||
entities.push(...collection.data.items);
|
||||
nextUrl = collection.data.next;
|
||||
nextUrl = collection.data.next
|
||||
? new URL(collection.data.next)
|
||||
: null;
|
||||
limit -= collection.data.items.length;
|
||||
}
|
||||
|
||||
return entities;
|
||||
return entities.map((u) => new URL(u));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue