Skip to content

Commit

Permalink
Merge branch 'feature/mv_middleware_token' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldv90 committed Nov 12, 2024
2 parents 6e20701 + ca2de39 commit ff9b120
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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);
}
}
4 changes: 3 additions & 1 deletion collection-v1/users_api/ProfileGetAPI.bru
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ headers {

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

0 comments on commit ff9b120

Please sign in to comment.