Skip to content

Commit

Permalink
Support void returns
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 25, 2024
1 parent 7fd76a4 commit 5a45e30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actors/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export const actors = {
};
return iterator;
}
if (resp.status === 204) {
return;
}
return resp.json();
};
},
Expand Down
3 changes: 3 additions & 0 deletions src/actors/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ export class ActorRuntime {
},
);
}
if (typeof res === "undefined") {
return new Response(null, { status: 204 });
}
return Response.json(res);
}
}

0 comments on commit 5a45e30

Please sign in to comment.