refactor: tighten upload and viewer contracts
This commit is contained in:
+3
-2
@@ -202,7 +202,8 @@ async function uploadToLfsBatch(
|
||||
throw new Error(`LFS batch request failed (${batchRes.status}): ${text}`)
|
||||
}
|
||||
|
||||
const batchObjects = parseLfsBatchResponse(await batchRes.json())
|
||||
const batchData: unknown = await batchRes.json()
|
||||
const batchObjects = parseLfsBatchResponse(batchData)
|
||||
|
||||
const objectMap = new Map(objects.map((o) => [o.oid, o]))
|
||||
|
||||
@@ -277,7 +278,7 @@ export async function getRemoteFolder(
|
||||
})
|
||||
|
||||
if (!Array.isArray(data)) {
|
||||
return { exists: false, files: [] }
|
||||
throw new Error(`Le chemin distant ${folderPath} existe mais ce n'est pas un dossier`)
|
||||
}
|
||||
|
||||
const files: RemoteFile[] = await Promise.all(
|
||||
|
||||
Reference in New Issue
Block a user