From 49fa1dff7c68861a58653da22fcae5431d70a087 Mon Sep 17 00:00:00 2001 From: Michael Sonntag Date: Fri, 23 Feb 2024 17:43:46 +0100 Subject: [PATCH 1/2] change username to email to match the endpoint add refreshtoken to http file fix url of update item detail change order of delete todolist so developer can go through all examples --- src/Web/Web-webapi.http | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Web/Web-webapi.http b/src/Web/Web-webapi.http index f06f8f1a6..92e0db75f 100644 --- a/src/Web/Web-webapi.http +++ b/src/Web/Web-webapi.http @@ -4,24 +4,25 @@ @Username=administrator@localhost @Password=Administrator1! @BearerToken= +@RefreshToken= # POST Users Register -POST {{Web_HostAddress}}/api/Users/Register +POST {{Web_HostAddress}}/api/Users/register Content-Type: application/json { - "username": "{{Username}}", + "email": "{{Username}}", "password": "{{Password}}" } ### # POST Users Login -POST {{Web_HostAddress}}/api/Users/Login +POST {{Web_HostAddress}}/api/Users/login Content-Type: application/json { - "username": "{{Username}}", + "email": "{{Username}}", "password": "{{Password}}" } @@ -33,7 +34,7 @@ Authorization: Bearer {{BearerToken}} Content-Type: application/json { - "refreshToken": "" + "refreshToken": "{{RefreshToken}}" } ### @@ -75,17 +76,10 @@ Content-Type: application/json ### -# DELETE TodoLists -DELETE {{Web_HostAddress}}/api/TodoLists/1 -Authorization: Bearer {{BearerToken}} - -### - # GET TodoItems @PageNumber = 1 @PageSize = 10 GET {{Web_HostAddress}}/api/TodoItems?ListId=1&PageNumber={{PageNumber}}&PageSize={{PageSize}} - Authorization: Bearer {{BearerToken}} ### @@ -96,7 +90,7 @@ Authorization: Bearer {{BearerToken}} Content-Type: application/json // CreateTodoItemCommand -{ +{ "ListId": 1, "Title": "Eat a burrito 🌯" } @@ -104,7 +98,7 @@ Content-Type: application/json ### #PUT TodoItems UpdateItemDetails -PUT {{Web_HostAddress}}/api/TodoItems/UpdateItemDetails?Id=1 +PUT {{Web_HostAddress}}/api/TodoItems/UpdateItemDetail/1 Authorization: Bearer {{BearerToken}} Content-Type: application/json @@ -136,4 +130,10 @@ Content-Type: application/json DELETE {{Web_HostAddress}}/api/TodoItems/1 Authorization: Bearer {{BearerToken}} +### + +# DELETE TodoLists +DELETE {{Web_HostAddress}}/api/TodoLists/1 +Authorization: Bearer {{BearerToken}} + ### \ No newline at end of file From 4b66ab5feb558d41baafa320546ab6bd8ec5f219 Mon Sep 17 00:00:00 2001 From: Michael Sonntag Date: Fri, 23 Feb 2024 17:46:10 +0100 Subject: [PATCH 2/2] fix url to match webapi --- src/Web/Web-webapi.http | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/Web-webapi.http b/src/Web/Web-webapi.http index 92e0db75f..e6fb10631 100644 --- a/src/Web/Web-webapi.http +++ b/src/Web/Web-webapi.http @@ -98,7 +98,7 @@ Content-Type: application/json ### #PUT TodoItems UpdateItemDetails -PUT {{Web_HostAddress}}/api/TodoItems/UpdateItemDetail/1 +PUT {{Web_HostAddress}}/api/TodoItems/UpdateDetail/1 Authorization: Bearer {{BearerToken}} Content-Type: application/json