Skip to content

Commit

Permalink
status to ok
Browse files Browse the repository at this point in the history
  • Loading branch information
nijmra committed Nov 18, 2024
1 parent 6ca1c97 commit 642c071
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions odpc.client/src/features/publicatie/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ const uploadFile = async (file: File, bestandsdelen: Bestandsdeel[]) => {

body.append("inhoud", blob);

const { status } = await fetch(pathname, {
const { ok } = await fetch(pathname, {
method: "PUT",
body
});

if (status !== 204) {
if (!ok) {
throw new Error(`Error uploadDocument: ${url}`);
}

Expand Down

0 comments on commit 642c071

Please sign in to comment.