Skip to content

Commit

Permalink
update http-files with current data, enable ProblemDetails in project
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasTiede committed Apr 1, 2024
1 parent f72fb1c commit 64b1189
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/api-calls/Authentication.http
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ POST {{protocol}}{{host}}:{{port}}/api/auth/registration
Content-Type: application/json

{
"username": "superman",
"password": "Str0nG!Pa55Word?",
"email": "your@email.com"
"username": "kirk_lazarus",
"password": "Encrypted!Pa55worD",
"email": "kirk.lazarus@gmail.com"
}


Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/api-calls/Comment.http
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

### get specific comment by id
GET {{protocol}}{{host}}:{{port}}/api/comment/3
GET {{protocol}}{{host}}:{{port}}/api/comment/1
Content-Type: application/json


### get all comments of a movie
GET {{protocol}}{{host}}:{{port}}/api/comment/2872718/comments
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
GET {{protocol}}{{host}}:{{port}}/api/comment/120382/comments
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoibGVzX2dyb3NzbWFuIiwic3ViIjoiMSIsImlhdCI6MTcxMTk2Mzg5NywiZXhwIjoxNzE0NTU1ODk3fQ.zFbNOSxfFQttqIxahFk827kApdbNQTIohxXc3SdgtB1QzmRutiOZA5SrKofr8Y5dxk1CsN4bTS0-53tO0OLV2w
Content-Type: application/json


### comment a movie
POST {{protocol}}{{host}}:{{port}}/api/comment/2872718
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY2ODcxNDkzLCJleHAiOjE2Njk0NjM0OTN9.uDiMKr1LvPiM5cg942jzk2REmHYgen8LEK-xpZQoqPQp9wJgyY_vBF0YG_kYGuT00p68dfLvVEkciivDZgGJIw
POST {{protocol}}{{host}}:{{port}}/api/comment/120382
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoibGVzX2dyb3NzbWFuIiwic3ViIjoiMSIsImlhdCI6MTcxMTk2Mzg5NywiZXhwIjoxNzE0NTU1ODk3fQ.zFbNOSxfFQttqIxahFk827kApdbNQTIohxXc3SdgtB1QzmRutiOZA5SrKofr8Y5dxk1CsN4bTS0-53tO0OLV2w
Content-Type: application/json

{
Expand All @@ -22,7 +22,7 @@ Content-Type: application/json

### update existing comment
PUT {{protocol}}{{host}}:{{port}}/api/comment/1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX1VTRVIiXSwidXNlcm5hbWUiOiJqZWZmX3BvcnRub3kiLCJzdWIiOiIyIiwiaWF0IjoxNzExOTY2NTY0LCJleHAiOjE3MTQ1NTg1NjR9.IwljCrFCtus9SKvo5B4FNxxliXVLlMGn671JeaE45CxtDEaRiAClOls553qZV805M_IsY_t8KjX_BQxcRiBlvg
Content-Type: application/json

{
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/api-calls/FileStorage.http
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

### store movie image
POST {{protocol}}{{host}}:{{port}}/api/file-storage/movie/48812
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInN1YiI6IjEiLCJpYXQiOjE2NzkzMDUzMDAsImV4cCI6MTY4MTg5NzMwMH0.wZTqM6p69J1DSrtO3bpLgc5yPVm8dWTffHTHT3lF5E8y9Qn4vK5JZeiD5yeGXxOc-FZy3cdauiZGpbCi74R4uA
POST {{protocol}}{{host}}:{{port}}/api/file-storage/movie/2872718
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6InN1cGVybWFuIiwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfVVNFUiJdLCJzdWIiOiIyIiwiaWF0IjoxNzExMTI5NDY5LCJleHAiOjE3MTM3MjE0Njl9.VVgFcLBNajKTBInxw8a_QUE26xlXqKEqzypkrhTQ_xZm1PqImr3Os3LrgDFLerFCzdRsTeaXlnSKakXoRJo0vA
Content-Type: multipart/form-data; boundary=boundary

--boundary
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/api-calls/Rating.http
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

### rate movie
GET {{protocol}}{{host}}:{{port}}/api/movie-rating/2872718/rating-score/7.8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
GET {{protocol}}{{host}}:{{port}}/api/movie-rating/2872718/rating-score/11
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoic3VwZXJtYW4iLCJzdWIiOiIyIiwiaWF0IjoxNzExMTQyMzEzLCJleHAiOjE3MTM3MzQzMTN9.AmAK3QBo7K1_xKxMDHN_A9L92Ltn9z-CU9-N-iLUmbE1FdKFA3bcpIFAritq3sadUcSR1caxXjx6AdXHurAsdA
Content-Type: application/json


### delete rating
DELETE {{protocol}}{{host}}:{{port}}/api/movie-rating/2872718
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoic3VwZXJtYW4iLCJzdWIiOiIyIiwiaWF0IjoxNzExMTQyMzEzLCJleHAiOjE3MTM3MzQzMTN9.AmAK3QBo7K1_xKxMDHN_A9L92Ltn9z-CU9-N-iLUmbE1FdKFA3bcpIFAritq3sadUcSR1caxXjx6AdXHurAsdA
Content-Type: application/json
4 changes: 2 additions & 2 deletions src/main/resources/api-calls/WatchedMovie.http
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

### watch a movie
GET {{protocol}}{{host}}:{{port}}/api/watched-movie/2872718/watch
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoibGVzX2dyb3NzbWFuIiwic3ViIjoiMSIsImlhdCI6MTcxMTkxMzQ1NCwiZXhwIjoxNzE0NTA1NDU0fQ.gYnFt18MWiyMnbwAZD4N1rmhr4I1MHq57LWDwdO0Sb8HbFGKvsoqfCLqxQR2J8IrlfDg5g4ELe1rJui8DBCrnA
Content-Type: application/json


### delete watched movie
DELETE {{protocol}}{{host}}:{{port}}/api/watched-movie/2872718
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjY0NDczODU4LCJleHAiOjE2NjcwNjU4NTh9.ETAhhVOlArJFdUVV1TsFO9xiEeUCICeorW19lZIgwtZeCS_qx_wrCL7sgcZjjrCb0IxO8pQWTvos9hXYZtF8JA
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoibGVzX2dyb3NzbWFuIiwic3ViIjoiMSIsImlhdCI6MTcxMTkxMzQ1NCwiZXhwIjoxNzE0NTA1NDU0fQ.gYnFt18MWiyMnbwAZD4N1rmhr4I1MHq57LWDwdO0Sb8HbFGKvsoqfCLqxQR2J8IrlfDg5g4ELe1rJui8DBCrnA
Content-Type: application/json
4 changes: 2 additions & 2 deletions src/main/resources/api-calls/elasticsearch/ElasticSearch.http
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Authorization: Basic <base64_credentials>


### search for by document id
GET {{protocol}}{{host}}:{{port}}/movies/_doc/2872718
GET {{protocol}}{{host}}:{{port}}/movies/_doc/109830
Authorization: Basic <base64_credentials>


Expand All @@ -41,7 +41,7 @@ Content-Type: application/json
{
"query": {
"match": {
"primaryTitle": "Nightcrawler"
"primaryTitle": "The"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ imdb-clone.backend.host=${BACKEND_APP_ADDRESS}
imdb-clone.frontend.host=${FRONTEND_APP_ADDRESS}

spring.threads.virtual.enabled=true
spring.mvc.problemdetails.enabled=true

### ------------ Database Config ----------------------
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Expand Down

0 comments on commit 64b1189

Please sign in to comment.