Tidied up Bruno files.

This commit is contained in:
jd
2026-02-21 17:56:28 +00:00
parent 407043c5be
commit ed942060a2
28 changed files with 256 additions and 95 deletions

View File

@@ -5,7 +5,7 @@ info:
http:
method: POST
url: http://localhost:3000/api/auth/login
url: "{{BASE_URL}}/api/auth/login"
headers:
- name: Content-Type
value: application/json
@@ -18,6 +18,16 @@ http:
}
auth: inherit
runtime:
scripts:
- type: after-response
code: |-
function onResponse(res) {
console.log(res.getHeader('set-cookie'));
bru.setEnvVar("REFRESH_COOKIE", res.getHeader('set-cookie'));
}
onResponse(res);
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,12 +5,22 @@ info:
http:
method: GET
url: http://localhost:3000/api/auth/token
url: "{{BASE_URL}}/api/auth/token"
headers:
- name: Cookie
value: refresh=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1IjoiMSIsInIiOiIxIiwiaWF0IjoxNzcxNTk3NjQ2LCJleHAiOjE3NzQxODk2NDZ9.07ViS5Nie3Bi2OgnlHyybDNZ9bdXPRRiqO-RFLhjoKo; Path=/; Max-Age=2592000; Secure; HttpOnly; SameSite=Lax
value: "{{REFRESH_COOKIE}}"
auth: inherit
runtime:
scripts:
- type: after-response
code: |-
function onResponse(res) {
let data = res.getBody();
bru.setEnvVar("BEARER_TOKEN", data.token);
}
onResponse(res);
settings:
encodeUrl: true
timeout: 0