mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 22:26:27 +00:00
Automate Bruno partner login with local credentials
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user