Add /api/filemeta and /api/filemeta/[token]

This commit is contained in:
2023-06-22 20:26:44 +08:00
parent ee1daa103e
commit 03b65d71c2
6 changed files with 121 additions and 10 deletions

View File

@@ -1,3 +1,8 @@
export async function get_string(value: FormDataEntryValue | null) {
if (value === null) return null;
return typeof value === "string" ? value : await value.text();
}
export async function parse_bool<T extends boolean | null>(
value: FormDataEntryValue | null,
def: T,