Skip to content

Commit

Permalink
fix: api
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Dec 13, 2024
1 parent 7184898 commit a2ca82e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/albert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ export const addFileToCollection = async ({
},
body: formData,
}).then(async (r) => {
//console.log(r);
console.log("addFileToCollection", r.status, r.statusText);
if (r.status !== 200) {
console.log("Cannot upload document", r.statusText);
return {
detail: r.statusText,
};
}
if (r.statusText === "OK") {
if (r.statusText === "OK" || r.statusText === "") {
let json: { detail?: string } = {};
try {
json = await r.json();
Expand Down

0 comments on commit a2ca82e

Please sign in to comment.