Skip to content

Commit 97a5321

Browse files
Stop deleteUser execution if user is not found
1 parent e3eba44 commit 97a5321

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/server/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ app.post("/deleteUser", async (req, res) => {
790790
const user = await EmailPassword.getUserByEmail("public", req.body.email);
791791
if (user === undefined) {
792792
res.status(404).send({ message: "User not found" });
793+
return;
793794
}
794795
res.send(await SuperTokens.deleteUser(user.id));
795796
});

0 commit comments

Comments
 (0)