🗑️ Clean up posts

This commit is contained in:
2025-03-17 20:58:36 +08:00
parent 975766302a
commit 97449bdc1e
6 changed files with 150 additions and 102 deletions

View File

@ -14,3 +14,13 @@ export async function solarFetch(input: string, init?: RequestInit) {
},
})
}
export function getAttachmentUrl(identifier: string | undefined): string | undefined {
if (identifier == null || identifier.length == 0) {
return undefined
}
if (identifier.startsWith("http")) {
return identifier
}
return `${useRuntimeConfig().public.solarNetworkApi}/cgi/uc/attachments/${identifier}`
}