Compare commits
No commits in common. "1b59c5873c51b80bd32ee9462a322aa31c40cd8e" and "d0a3b553a599b1cbf1aa6c31a69abc796faff08e" have entirely different histories.
1b59c5873c
...
d0a3b553a5
2 changed files with 2 additions and 23 deletions
|
|
@ -326,11 +326,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function authHeaders(): Promise<Record<string, string>> {
|
|
||||||
const token = await $auth?.getIdToken?.();
|
|
||||||
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function uploadFiles() {
|
async function uploadFiles() {
|
||||||
const currentUser = $auth;
|
const currentUser = $auth;
|
||||||
if (!currentUser) {
|
if (!currentUser) {
|
||||||
|
|
@ -382,7 +377,6 @@
|
||||||
|
|
||||||
const response = await fetch(UPLOAD_PROXY_ENDPOINT, {
|
const response = await fetch(UPLOAD_PROXY_ENDPOINT, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: await authHeaders(),
|
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -481,11 +475,7 @@
|
||||||
fd.append('email', email);
|
fd.append('email', email);
|
||||||
fd.append('file', new File([text], MANIFEST_FILENAME, { type: 'text/plain' }));
|
fd.append('file', new File([text], MANIFEST_FILENAME, { type: 'text/plain' }));
|
||||||
|
|
||||||
const res = await fetch(MANIFEST_PROXY_ENDPOINT, {
|
const res = await fetch(MANIFEST_PROXY_ENDPOINT, { method: 'POST', body: fd });
|
||||||
method: "POST",
|
|
||||||
headers: await authHeaders(),
|
|
||||||
body: fd
|
|
||||||
});
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const e = await res.json().catch(() => ({ detail: res.statusText }));
|
const e = await res.json().catch(() => ({ detail: res.statusText }));
|
||||||
throw new Error(e.detail || 'Manifest upload failed');
|
throw new Error(e.detail || 'Manifest upload failed');
|
||||||
|
|
@ -571,11 +561,7 @@
|
||||||
new File([manifestText], MANIFEST_FILENAME, { type: 'text/plain' })
|
new File([manifestText], MANIFEST_FILENAME, { type: 'text/plain' })
|
||||||
);
|
);
|
||||||
|
|
||||||
const res = await fetch(MANIFEST_PROXY_ENDPOINT, {
|
const res = await fetch(MANIFEST_PROXY_ENDPOINT, { method: 'POST', body: fd });
|
||||||
method: "POST",
|
|
||||||
headers: await authHeaders(),
|
|
||||||
body: fd
|
|
||||||
});
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const e = await res.json().catch(() => ({ detail: res.statusText }));
|
const e = await res.json().catch(() => ({ detail: res.statusText }));
|
||||||
throw new Error(e.detail || 'Manifest upload failed');
|
throw new Error(e.detail || 'Manifest upload failed');
|
||||||
|
|
|
||||||
|
|
@ -121,12 +121,6 @@
|
||||||
files = [];
|
files = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function authHeaders(): Promise<Record<string, string>> {
|
|
||||||
const token = await $auth?.getIdToken?.();
|
|
||||||
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function uploadFiles() {
|
async function uploadFiles() {
|
||||||
const currentUser = $auth;
|
const currentUser = $auth;
|
||||||
if (!currentUser) {
|
if (!currentUser) {
|
||||||
|
|
@ -165,7 +159,6 @@
|
||||||
|
|
||||||
const response = await fetch(UPLOAD_PROXY_ENDPOINT, {
|
const response = await fetch(UPLOAD_PROXY_ENDPOINT, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: await authHeaders(),
|
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue