feat: add password and fix errors

This commit is contained in:
Elton Minetto
2020-06-29 13:38:13 -03:00
parent 328b4e428c
commit d4b9b713e4
12 changed files with 246 additions and 21 deletions
+22 -4
View File
@@ -29,7 +29,7 @@ curl -X "POST" "http://localhost:8080/v1/book" \
"title": "I Am Ozzy",
"author": "Ozzy Osbourne",
"pages": 294,
"quantity":1
"quantity":10
}'
```
### Search book
@@ -56,10 +56,9 @@ curl -X "POST" "http://localhost:8080/v1/user" \
-H 'Accept: application/json' \
-d $'{
"email": "[email protected]",
"fist_name": "Ozzy",
"first_name": "Ozzy",
"last_name": "Osbourne",
"password": "bateater666",
"quantity":1
"password": "bateater666"
}'
```
@@ -79,6 +78,25 @@ curl "http://localhost:8080/v1/user" \
-H 'Accept: application/json'
```
### Borrow a book
```
curl "http://localhost:8080/v1/loan/borrow/be8b1757-b043-4dbd-b873-63fa9ecd8bb1/282885d7-5d5e-4205-87eb-edc2b2ac5022" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
```
### Return a book
```
curl "http://localhost:8080/v1/loan/return/be8b1757-b043-4dbd-b873-63fa9ecd8bb1" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
```
## CMD
### Search for a book