Automate Bruno partner login with local credentials

This commit is contained in:
Mohamad Ihsan
2026-11-25 16:11:35 +07:00
parent e65430c469
commit 3d392d1e6f
2 changed files with 15 additions and 3 deletions
+10 -2
View File
@@ -16,8 +16,16 @@ headers {
body:json {
{
"email": "partner@example.test",
"password": "SamplePassword-OnlyForLocal"
"email": "{{process.env.BRUNO_PARTNER_EMAIL}}",
"password": "{{process.env.BRUNO_PARTNER_PASSWORD}}"
}
}
script:post-response {
const body = res.getBody();
if (body?.code === '00' && body.data?.access_token && body.data?.refresh_token) {
bru.setVar('accessToken', body.data.access_token);
bru.setVar('refreshToken', body.data.refresh_token);
}
}