debut refacto
This commit is contained in:
@@ -118,7 +118,7 @@ async function checkFolderDiffs(
|
||||
): Promise<CheckResult> {
|
||||
try {
|
||||
const params = new URLSearchParams({ folderName: folder.folderName, destination })
|
||||
const res = await fetch(`/api/upload?${params}`, {
|
||||
const res = await fetch(`/api/upload/check?${params}`, {
|
||||
headers: { 'x-upload-secret': secret.trim() },
|
||||
})
|
||||
const data = await res.json()
|
||||
@@ -195,7 +195,7 @@ async function uploadFolder(
|
||||
onProgress(10)
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/upload', {
|
||||
const res = await fetch('/api/upload/git', {
|
||||
method: 'POST',
|
||||
headers: { 'x-upload-secret': secret.trim() },
|
||||
body: formData,
|
||||
|
||||
Reference in New Issue
Block a user