Skip to content

Commit

Permalink
Merge pull request #18 from samuliasmala/antti/user-api
Browse files Browse the repository at this point in the history
Valmis, mergetään!
  • Loading branch information
anttiasmala authored Mar 14, 2024
2 parents f11b2d9 + b896e73 commit 94d4017
Show file tree
Hide file tree
Showing 6 changed files with 670 additions and 5 deletions.
64 changes: 61 additions & 3 deletions api.rest
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

@baseUrl = http://localhost:3000/api

# GIFT REQUESTS

###
GET {{baseUrl}}/gifts

###
GET {{baseUrl}}/gifts/1141b4b1-7ea3-40dd-853c-1a0f9eecb4b5
GET {{baseUrl}}/gifts/e7051758-f907-4ebf-bcaf-5b26b3198409

###
POST {{baseUrl}}/gifts
Expand All @@ -19,9 +21,65 @@ Content-Type: application/json
}

###
PUT {{baseUrl}}/gifts/1141b4b1-7ea3-40dd-853c-1a0f9eecb4b5
PATCH {{baseUrl}}/gifts/e7051758-f907-4ebf-bcaf-5b26b3198409
Content-Type: application/json

{
"receiver": "Aku Ankka",
"gift": "Kortti"
}

###
PUT {{baseUrl}}/gifts/e7051758-f907-4ebf-bcaf-5b26b3198409
Content-Type: application/json

{
"receiver": "Aku Ankka"
"receiver": "Aku Ankka",
"gift": "Kortti"
}

###
DELETE {{baseUrl}}/gifts/e7051758-f907-4ebf-bcaf-5b26b3198409


# USER REQUESTS

###
GET {{baseUrl}}/users

###
GET {{baseUrl}}/users/26ab195c-5f56-4831-bedd-07725e8012ff

###
POST {{baseUrl}}/users
Content-Type: application/json

{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"password": "AlwaysHashThePasswordAndNeverUsePlainText"
}

###
PATCH {{baseUrl}}/users/26ab195c-5f56-4831-bedd-07725e8012ff
Content-Type: application/json

{
"email": "[email protected]",
"firstName": "Matti",
"lastName": "Meikäläinen"
}

###
PUT {{baseUrl}}/users/26ab195c-5f56-4831-bedd-07725e8012ff
Content-Type: application/json

{
"email": "[email protected]",
"firstName": "Matti",
"lastName": "Meikäläinen"
}

###
DELETE {{baseUrl}}/users/26ab195c-5f56-4831-bedd-07725e8012ff
Loading

0 comments on commit 94d4017

Please sign in to comment.