chore: format file

This commit is contained in:
Methapon2001 2025-01-10 14:29:06 +07:00
parent bd1d275d9c
commit d635ffbc66

View file

@ -143,7 +143,13 @@ export async function listFile(path: string[]) {
return (await list("file", path)) as StorageFile[] | boolean;
}
export async function updateFile(path: string[], file: string, metadata: FileProps, destPath?: string[], destFile?: string) {
export async function updateFile(
path: string[],
file: string,
metadata: FileProps,
destPath?: string[],
destFile?: string,
) {
const res = await fetch(`${STORAGE_URL}/storage/file`, {
method: "PUT",
headers: {
@ -152,7 +158,7 @@ export async function updateFile(path: string[], file: string, metadata: FilePro
},
body: JSON.stringify({
from: { path, file },
to: destPath && destFile ? { path: destPath, file: destFile,} : undefined,
to: destPath && destFile ? { path: destPath, file: destFile } : undefined,
...metadata,
upload: false,
}),