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

View File

@@ -0,0 +1,28 @@
info:
name: Add game
type: http
seq: 6
http:
method: POST
url: "{{BASE_URL}}/api/collection/{{CollectionID}}/add"
body:
type: json
data: |-
{
"gameId": "{{GameID}}"
}
auth: inherit
runtime:
variables:
- name: CollectionID
value: ""
- name: GameID
value: ""
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -5,15 +5,20 @@ info:
http:
method: POST
url: http://localhost:3000/api/collection
url: "{{BASE_URL}}/api/collection"
body:
type: json
data: |-
{
"name": "Invited player2"
"name": "{{Name}}"
}
auth: inherit
runtime:
variables:
- name: Name
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: DELETE
url: http://localhost:3000/api/collection/:id
params:
- name: id
value: bmOe
type: path
url: "{{BASE_URL}}/api/collection/{{CollectionID}}"
auth: inherit
runtime:
variables:
- name: CollectionID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,18 @@ info:
http:
method: GET
url: http://localhost:3000/api/collection/:id
url: "{{BASE_URL}}/api/collection/{{CollectionID}}"
params:
- name: id
value: ejRe
type: path
- name: ""
value: ""
type: query
auth: inherit
runtime:
variables:
- name: CollectionID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,9 +5,16 @@ info:
http:
method: GET
url: http://localhost:3000/api/collection/list
url: "{{BASE_URL}}/api/collection/list/{{PageSize}}/{{Page}}"
auth: inherit
runtime:
variables:
- name: PageSize
value: "1"
- name: Page
value: "0"
settings:
encodeUrl: true
timeout: 0

View File

@@ -0,0 +1,28 @@
info:
name: Remove game
type: http
seq: 7
http:
method: POST
url: "{{BASE_URL}}/api/collection/{{CollectionID}}/remove"
body:
type: json
data: |-
{
"gameId": "{{GameID}}"
}
auth: inherit
runtime:
variables:
- name: CollectionID
value: ""
- name: GameID
value: ""
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -5,21 +5,22 @@ info:
http:
method: PATCH
url: http://localhost:3000/api/collection/:id
params:
- name: id
value: bmOe
type: path
url: "{{BASE_URL}}/api/collection/{{CollectionID}}"
body:
type: json
data: |-
{
"name": "Test Player",
"isRatingLocked": true,
"canBeMultiple": false
"name": "{{Name}}"
}
auth: inherit
runtime:
variables:
- name: CollectionID
value: ""
- name: Name
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,15 +5,20 @@ info:
http:
method: POST
url: http://localhost:3000/api/game
url: "{{BASE_URL}}/api/game"
body:
type: json
data: |-
{
"name": "Test Game3"
"name": "{{Name}}"
}
auth: inherit
runtime:
variables:
- name: Name
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: DELETE
url: http://localhost:3000/api/game/:id
params:
- name: id
value: bk5e
type: path
url: "{{BASE_URL}}/api/game/{{GameID}}"
auth: inherit
runtime:
variables:
- name: GameID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: GET
url: http://localhost:3000/api/game/:id
params:
- name: id
value: bk5e
type: path
url: "{{BASE_URL}}/api/game/{{GameID}}"
auth: inherit
runtime:
variables:
- name: GameID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,18 @@ info:
http:
method: GET
url: http://localhost:3000/api/game/search/:query
params:
- name: query
value: game
type: path
url: "{{BASE_URL}}/api/game/search/{{Query}}/{{PageSize}}/{{Page}}"
auth: inherit
runtime:
variables:
- name: Query
value: test
- name: PageSize
value: "2"
- name: Page
value: "2"
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,19 +5,22 @@ info:
http:
method: PATCH
url: http://localhost:3000/api/game/:id
params:
- name: id
value: el5a
type: path
url: "{{BASE_URL}}/api/game/{{GameID}}"
body:
type: json
data: |-
{
"name":"Updated game"
"name":"{{Name}}"
}
auth: inherit
runtime:
variables:
- name: GameID
value: ""
- name: Name
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,16 +5,23 @@ info:
http:
method: POST
url: http://localhost:3000/api/invite/accept
url: "{{BASE_URL}}/api/invite/accept"
body:
type: json
data: |-
{
"inviteCode": "3ST6N8",
"password": "test123"
"inviteCode": "{{InviteCode}}",
"password": "{{Password}}
}
auth: inherit
runtime:
variables:
- name: InviteCode
value: ""
- name: Password
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,16 +5,23 @@ info:
http:
method: POST
url: http://localhost:3000/api/invite
url: "{{BASE_URL}}/api/invite"
body:
type: json
data: |-
{
"email": "james+test2@dardry.com",
"playerId": "boja"
"email": "{{Email}}",
"playerId": "{{PlayerID}}"
}
auth: inherit
runtime:
variables:
- name: Email
value: ""
- name: PlayerID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -1,7 +1,7 @@
info:
name: Invites
type: folder
seq: 5
seq: 1
request:
auth: inherit

View File

@@ -5,15 +5,20 @@ info:
http:
method: POST
url: http://localhost:3000/api/player
url: "{{BASE_URL}}/api/player"
body:
type: json
data: |-
{
"name": "Invited player2"
"name": "{{Name}}"
}
auth: inherit
runtime:
variables:
- name: Name
value: Test
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: DELETE
url: http://localhost:3000/api/player/:id
params:
- name: id
value: bmOe
type: path
url: "{{BASE_URL}}/api/player/{{PlayerID}}"
auth: inherit
runtime:
variables:
- name: PlayerID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: GET
url: http://localhost:3000/api/player/:id
params:
- name: id
value: ejRe
type: path
url: "{{BASE_URL}}/api/player/{{PlayerID}}"
auth: inherit
runtime:
variables:
- name: PlayerID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,7 +5,7 @@ info:
http:
method: GET
url: http://localhost:3000/api/player/list
url: "{{BASE_URL}}/api/player/list"
auth: inherit
settings:

View File

@@ -5,21 +5,24 @@ info:
http:
method: PATCH
url: http://localhost:3000/api/player/:id
params:
- name: id
value: bmOe
type: path
url: "{{BASE_URL}}/api/player/{{PlayerID}}"
body:
type: json
data: |-
{
"name": "Test Player",
"isRatingLocked": true,
"name": "{{Name}}",
"isRatingLocked": false,
"canBeMultiple": false
}
auth: inherit
runtime:
variables:
- name: Name
value: Foo
- name: PlayerID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,17 +5,26 @@ info:
http:
method: POST
url: http://localhost:3000/api/user
url: "{{BASE_URL}}/api/user"
body:
type: json
data: |-
{
"email": "Test User",
"password": "Test123",
"playerId": "enRe"
"email": "{{Email}}",
"password": "{{Password}}",
"playerId": "{{PlayerID}}"
}
auth: inherit
runtime:
variables:
- name: Email
value: ""
- name: Password
value: ""
- name: PlayerID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: DELETE
url: http://localhost:3000/api/user/:id
params:
- name: id
value: ""
type: path
url: "{{BASE_URL}}/api/user/{{UserID}}"
auth: inherit
runtime:
variables:
- name: UserID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,13 +5,14 @@ info:
http:
method: GET
url: http://localhost:3000/api/user/:id
params:
- name: id
value: ejRe
type: path
url: "{{BASE_URL}}/api/user/{{UserID}}"
auth: inherit
runtime:
variables:
- name: UserID
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -5,20 +5,28 @@ info:
http:
method: PATCH
url: http://localhost:3000/api/user/:id
params:
- name: id
value: ""
type: path
url: "{{BASE_URL}}/api/user/{{UserID}}"
body:
type: json
data: |-
{
"isActive": true,
"isAdmin": false
"isActive": {{IsActive}},
"isAdmin": {{IsAdmin}},
"email": "{{Email}}"
}
auth: inherit
runtime:
variables:
- name: UserID
value: ""
- name: IsActive
value: ""
- name: IsAdmin
value: ""
- name: Email
value: ""
settings:
encodeUrl: true
timeout: 0

View File

@@ -0,0 +1,8 @@
name: BGApp
variables:
- name: BEARER_TOKEN
value: ""
- name: REFRESH_COOKIE
value: ""
- name: BASE_URL
value: http://localhost:3000

View File

@@ -17,7 +17,7 @@ config:
request:
auth:
type: bearer
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJNUFJLTFIiLCJjbGFpbXMiOlsiQURNSU4iLCJVU0VSU19DUkVBVEUiLCJVU0VSU19TRUxGX1JFQUQiLCJVU0VSU19TRUxGX1VQREFURSIsIlVTRVJTX1NFTEZfREVMRVRFIiwiVVNFUlNfT1RIRVJfUkVBRCIsIlVTRVJTX09USEVSX1VQREFURSJdLCJpYXQiOjE3NzE2ODcxNzAsImV4cCI6MTgwMzIyMzE3MH0.inf1q3LTMuTkzLI-lEezYduPCpidJDaqsWZNNIY_doE
token: "{{BEARER_TOKEN}}"
actions:
- type: set-variable
phase: after-response