Update documentation and gate tag creation behind admin role, create default admin on database seeding

This commit is contained in:
2025-10-06 16:35:55 +03:00
parent 25dfb97a5b
commit 8d012f04f1
17 changed files with 149 additions and 33 deletions

View File

@@ -0,0 +1,23 @@
meta {
name: Login as admin
type: http
seq: 3
}
post {
url: {{baseUrl}}/api/auth/login
body: json
auth: none
}
body:json {
{
"email": "admin@localhost",
"password": "ChangeMe123#"
}
}
vars:post-response {
accessToken: res.body.accessToken
refreshToken: res.body.refreshToken
}

View File

@@ -7,7 +7,7 @@ meta {
post {
url: {{baseUrl}}/api/auth/login
body: json
auth: inherit
auth: none
}
body:json {

View File

@@ -1,7 +1,7 @@
meta {
name: Refresh token
type: http
seq: 3
seq: 4
}
post {

View File

@@ -7,7 +7,7 @@ meta {
post {
url: {{baseUrl}}/api/auth/register
body: json
auth: inherit
auth: none
}
body:json {

View File

@@ -7,11 +7,7 @@ meta {
post {
url: {{baseUrl}}/api/posts
body: json
auth: bearer
}
auth:bearer {
token: {{accessToken}}
auth: inherit
}
body:json {

View File

@@ -7,9 +7,5 @@ meta {
delete {
url: {{baseUrl}}/api/posts/1
body: none
auth: bearer
}
auth:bearer {
token: {{accessToken}}
auth: inherit
}

View File

@@ -7,11 +7,7 @@ meta {
patch {
url: {{baseUrl}}/api/posts/1
body: json
auth: bearer
}
auth:bearer {
token: {{accessToken}}
auth: inherit
}
body:json {

View File

@@ -6,7 +6,7 @@ meta {
patch {
url: {{baseUrl}}/api/tags/:name
body: none
body: json
auth: inherit
}
@@ -17,3 +17,9 @@ params:query {
params:path {
name: high-res
}
body:json {
{
"type": "Copyright"
}
}

View File

@@ -3,7 +3,11 @@ meta {
}
auth {
mode: none
mode: bearer
}
auth:bearer {
token: {{accessToken}}
}
vars:pre-request {