fix: 🐛 oops

This commit is contained in:
May 2024-11-21 19:47:01 -08:00
parent 54706e513e
commit 0253aacb35
Signed by: split
GPG key ID: C325C61F0BF517C0
2 changed files with 3 additions and 3 deletions

View file

@ -3,10 +3,10 @@ import { AvaRequest } from "./types.js"
import mime from "mime"
export default async function downloadAvatarForPayload(
{ id, url }: z.infer<typeof AvaRequest>,
{ id, host }: z.infer<typeof AvaRequest>,
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

View file

@ -15,7 +15,7 @@ export function translator<T extends AnyZodObject>(tl: Translator<T>) {
const AvaMetadata = z.object({
altText: z.string().optional(),
source: z.string().optional(),
url: z.string(),
host: z.string(),
})
export const AvaRequest = z.discriminatedUnion("default", [