Skip to content

Commit

Permalink
Add null check for token in SignInAPI response handling
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldv90 committed Nov 12, 2024
1 parent 0da40f4 commit ca2de39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collection-v1/auth_api/SignInAPI.bru
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ body:json {

script:post-response {
let data = res.getBody();
bru.setEnvVar('token',data.token);
if (data.token) {
bru.setEnvVar('token', data.token);
}
}

0 comments on commit ca2de39

Please sign in to comment.