Fix search publication mechanism.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
meta {
|
||||
name: Create a new category
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/categories
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "New category with sub-category",
|
||||
"subCategoryIds": [
|
||||
"2d19d037-57a1-44a1-9a20-766b4e3628b6"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Delete an existing category
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{url}}/api/categories/{{categoryId}}
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
meta {
|
||||
name: Get all categories
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/categories
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Update an existing category
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{url}}/api/categories/{{categoryId}}
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "Another name of the category",
|
||||
"subCategoryIds": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Create a new picture
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/pictures
|
||||
body: multipartForm
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
|
||||
body:multipart-form {
|
||||
file: @file(/Users/florian_thierry/Pictures/applications_mac.jpeg)
|
||||
}
|
||||
11
rest-client-collection/Codiki/Pictures/Load a picture.bru
Normal file
11
rest-client-collection/Codiki/Pictures/Load a picture.bru
Normal file
@@ -0,0 +1,11 @@
|
||||
meta {
|
||||
name: Load a picture
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/pictures/{{pictureId}}
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Create a new publication
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/publications
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title" : "Test",
|
||||
"text" : "Test",
|
||||
"description" : "Test",
|
||||
"illustrationId" : "e2a5618e-ef83-4e83-b8ec-0aa129173f85",
|
||||
"categoryId" : "3f4b4540-a901-92f3-1c15-8ec9172f820e"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Delete an existing publication
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{url}}/api/publications/{{publicationId}}
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Get a publication by its id
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/publications/{{publicationId}}
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Search publications
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/publications?query=test
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
query {
|
||||
query: test
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Update an existing publication
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{url}}/api/publications/{{publicationId}}
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{bearerToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title" : "Le titre de la publication.",
|
||||
"text" : "Un autre contenu de la publication.",
|
||||
"description" : "Une autre description de la publication",
|
||||
"image" : "https://google.com/logos/doodles/2024/celebrating-the-flat-white-6753651837110463-s.png",
|
||||
"categoryId" : "fd424c2f-6e58-4812-a179-00e50a0eab05"
|
||||
}
|
||||
}
|
||||
18
rest-client-collection/Codiki/Users/Login as admin user.bru
Normal file
18
rest-client-collection/Codiki/Users/Login as admin user.bru
Normal file
@@ -0,0 +1,18 @@
|
||||
meta {
|
||||
name: Login as admin user
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/login
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"id": "15a13dc7-029d-4eab-a63d-c1e96f90241d",
|
||||
"password": "password"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
meta {
|
||||
name: Login as standard user
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/login
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"id": "5ad462b8-8f9e-4a26-bb86-c74fef5d11b6",
|
||||
"password": "password"
|
||||
}
|
||||
}
|
||||
11
rest-client-collection/Codiki/Users/Sign in.bru
Normal file
11
rest-client-collection/Codiki/Users/Sign in.bru
Normal file
@@ -0,0 +1,11 @@
|
||||
meta {
|
||||
name: Sign in
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/users
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
vars {
|
||||
url: http://localhost:8080
|
||||
publicationId: e23831a6-9cc0-4f3d-9efa-7a1cae191cb1
|
||||
bearerToken: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1YWQ0NjJiOC04ZjllLTRhMjYtYmI4Ni1jNzRmZWY1ZDExYjYiLCJleHAiOjE3MTA0OTc2MTd9.xYfS-9CrJxCKUyvZ1ejMKErEttA1zysXxjlVzHFzXJ3ct9dt13xuiI7PHA-8_xY7HQjuIP1M5P2p0OGVsnxXsw
|
||||
bearerToken: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1YWQ0NjJiOC04ZjllLTRhMjYtYmI4Ni1jNzRmZWY1ZDExYjYiLCJleHAiOjE3MTA1MjE5NzN9.KgYeDYNjgM4ndv_An0fAoOdx7qHRJDXuUPnBEcn6es5kn2g-HDjgt1n_s5CD3_F13alBdR18--9dZlWV8qQmHg
|
||||
categoryId: 172fa901-3f4b-4540-92f3-1c15820e8ec9
|
||||
pictureId: 65b660b7-66bb-4e4a-a62c-fd0ca101f972
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user