mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 🐛 Fix all TypeScript issues
This commit is contained in:
parent
29aa43f4ce
commit
2b5b82b465
7 changed files with 16 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ export const getBestContentType = (
|
|||
};
|
||||
|
||||
export const urlToContentFormat = (
|
||||
url: string,
|
||||
url?: string,
|
||||
): typeof EntityValidator.$ContentFormat | null => {
|
||||
if (!url) return null;
|
||||
if (url.startsWith("https://api.dicebear.com/")) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export const redirect = (url: string | URL, status = 302) => {
|
|||
});
|
||||
};
|
||||
|
||||
export const proxyUrl = (url: string | null) => {
|
||||
export const proxyUrl = (url: string | null = null) => {
|
||||
const urlAsBase64Url = Buffer.from(url || "").toString("base64url");
|
||||
return url
|
||||
? new URL(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue