fix: 🐛 oops
This commit is contained in:
parent
54706e513e
commit
0253aacb35
|
@ -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
|
||||
|
||||
|
|
|
@ -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", [
|
||||
|
|
Loading…
Reference in a new issue