diff --git a/backend/src/accounts/getAccount.ts b/backend/src/accounts/getAccount.ts index 304ba8a..959e3fc 100644 --- a/backend/src/accounts/getAccount.ts +++ b/backend/src/accounts/getAccount.ts @@ -24,7 +24,7 @@ export async function getAccount(domain: string, accountId: string, db: Database } } -async function getRemoteAccount(handle: Handle, acct: string, db: D1Database): Promise { +async function getRemoteAccount(handle: Handle, acct: string, db: Database): Promise { // TODO: using webfinger isn't the optimal implementation. We could cache // the object in D1 and directly query the remote API, indicated by the actor's // url field. For now, let's keep it simple. diff --git a/backend/src/webfinger/index.ts b/backend/src/webfinger/index.ts index e0f8502..5fd011b 100644 --- a/backend/src/webfinger/index.ts +++ b/backend/src/webfinger/index.ts @@ -1,4 +1,5 @@ import * as actors from '../activitypub/actors' +import { type Database } from 'wildebeest/backend/src/database' import type { Actor } from '../activitypub/actors' export type WebFingerResponse = { @@ -11,7 +12,7 @@ const headers = { accept: 'application/jrd+json', } -export async function queryAcct(domain: string, db: D1Database, acct: string): Promise { +export async function queryAcct(domain: string, db: Database, acct: string): Promise { const url = await queryAcctLink(domain, acct) if (url === null) { return null diff --git a/functions/api/v1/apps/verify_credentials.ts b/functions/api/v1/apps/verify_credentials.ts index 9cbae78..e229d56 100644 --- a/functions/api/v1/apps/verify_credentials.ts +++ b/functions/api/v1/apps/verify_credentials.ts @@ -1,5 +1,6 @@ // https://docs.joinmastodon.org/methods/apps/#verify_credentials +import { type Database } from 'wildebeest/backend/src/database' import { cors } from 'wildebeest/backend/src/utils/cors' import { VAPIDPublicKey } from 'wildebeest/backend/src/mastodon/subscription' import { getVAPIDKeys } from 'wildebeest/backend/src/config' @@ -24,7 +25,7 @@ export const onRequest: PagesFunction = async ({ request, return handleRequest(env.DATABASE, request, getVAPIDKeys(env)) } -export async function handleRequest(db: D1Database, request: Request, vapidKeys: JWK) { +export async function handleRequest(db: Database, request: Request, vapidKeys: JWK) { if (request.method !== 'GET') { return new Response('', { status: 400 }) }