diff --git a/src/lib/downloadAvatarForPayload.ts b/src/lib/downloadAvatarForPayload.ts index f92eae4..68424f5 100644 --- a/src/lib/downloadAvatarForPayload.ts +++ b/src/lib/downloadAvatarForPayload.ts @@ -3,10 +3,10 @@ import { AvaRequest } from "./types.js" import mime from "mime" export default async function downloadAvatarForPayload( - { id, url }: z.infer, + { id, host }: z.infer, tryFmts: (string | undefined)[] = [undefined] ) { - let endpoint = new URL(`/avatars/${id}/image`, url) + let endpoint = new URL(`/avatars/${id}/image`, host) let response = undefined, buf = undefined diff --git a/src/lib/types.ts b/src/lib/types.ts index a3a65ba..a5149b7 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -15,7 +15,7 @@ export function translator(tl: Translator) { const AvaMetadata = z.object({ altText: z.string().optional(), source: z.string().optional(), - url: z.string(), + host: z.string(), }) export const AvaRequest = z.discriminatedUnion("default", [