From 0253aacb35ce7e5344c6d26ab8c7cd8b3c384ea0 Mon Sep 17 00:00:00 2001 From: split Date: Thu, 21 Nov 2024 19:47:01 -0800 Subject: [PATCH] fix: :bug: oops --- src/lib/downloadAvatarForPayload.ts | 4 ++-- src/lib/types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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", [