refactor(api): 🏷️ Port all /api/v1/accounts to use new schemas
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-02-13 01:31:15 +01:00
parent a0ce18337a
commit e3e285571e
No known key found for this signature in database
44 changed files with 840 additions and 475 deletions

View file

@ -36,7 +36,7 @@ const route = createRoute({
export default apiRoute((app) =>
app.openapi(route, (context) => {
const baseUrl = new URL(config.http.base_url);
const baseUrl = config.http.base_url;
return context.json(
{
issuer: baseUrl.origin.toString(),

View file

@ -39,7 +39,7 @@ export default apiRoute((app) =>
],
versions: ["0.4.0"],
},
host: new URL(config.http.base_url).host,
host: config.http.base_url.host,
name: config.instance.name,
description: config.instance.description,
public_key: {

View file

@ -63,7 +63,7 @@ export default apiRoute((app) =>
const requestedUser = resource.split("acct:")[1];
const host = new URL(config.http.base_url).host;
const host = config.http.base_url.host;
const { username, domain } = parseUserAddress(requestedUser);
@ -96,7 +96,7 @@ export default apiRoute((app) =>
try {
activityPubUrl = await manager.webFinger(
user.data.username,
new URL(config.http.base_url).host,
config.http.base_url.host,
"application/activity+json",
config.federation.bridge.url?.toString(),
);