Skip to content

Commit f07deb6

Browse files
authored
Merge branch 'jmprieur/removingUis' into jmprieur/webappwebapib2c
2 parents e0d78fd + 075bfc8 commit f07deb6

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

4-WebApp-your-API/4-1-MyOrg/Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

44
using Microsoft.AspNetCore.Hosting;

4-WebApp-your-API/4-1-MyOrg/Client/Services/TodoListService.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

44
using Microsoft.AspNetCore.Http;
@@ -51,7 +51,6 @@ public async Task<Todo> AddAsync(Todo todo)
5151

5252
var jsonRequest = JsonConvert.SerializeObject(todo);
5353
var jsoncontent = new StringContent(jsonRequest, Encoding.UTF8, "application/json");
54-
5554
var response = await this._httpClient.PostAsync($"{ _TodoListBaseAddress}/api/todolist", jsoncontent);
5655

5756
if (response.StatusCode == HttpStatusCode.OK)
@@ -69,7 +68,7 @@ public async Task DeleteAsync(int id)
6968
{
7069
await PrepareAuthenticatedClient();
7170

72-
var response = await this._httpClient.DeleteAsync($"{ _TodoListBaseAddress}/api/todolist/{id}");
71+
var response = await _httpClient.DeleteAsync($"{ _TodoListBaseAddress}/api/todolist/{id}");
7372

7473
if (response.StatusCode == HttpStatusCode.OK)
7574
{
@@ -85,7 +84,6 @@ public async Task<Todo> EditAsync(Todo todo)
8584

8685
var jsonRequest = JsonConvert.SerializeObject(todo);
8786
var jsoncontent = new StringContent(jsonRequest, Encoding.UTF8, "application/json-patch+json");
88-
8987
var response = await _httpClient.PatchAsync($"{ _TodoListBaseAddress}/api/todolist/{todo.Id}", jsoncontent);
9088

9189
if (response.StatusCode == HttpStatusCode.OK)
@@ -102,7 +100,6 @@ public async Task<Todo> EditAsync(Todo todo)
102100
public async Task<IEnumerable<Todo>> GetAsync()
103101
{
104102
await PrepareAuthenticatedClient();
105-
106103
var response = await _httpClient.GetAsync($"{ _TodoListBaseAddress}/api/todolist");
107104
if (response.StatusCode == HttpStatusCode.OK)
108105
{
@@ -126,7 +123,6 @@ private async Task PrepareAuthenticatedClient()
126123
public async Task<Todo> GetAsync(int id)
127124
{
128125
await PrepareAuthenticatedClient();
129-
130126
var response = await _httpClient.GetAsync($"{ _TodoListBaseAddress}/api/todolist/{id}");
131127
if (response.StatusCode == HttpStatusCode.OK)
132128
{

4-WebApp-your-API/4-1-MyOrg/Client/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Microsoft.Extensions.DependencyInjection;
1111
using Microsoft.Identity.Web;
1212
using Microsoft.Identity.Web.TokenCacheProviders.InMemory;
13+
1314
using TodoListClient.Services;
1415
using Microsoft.Extensions.Hosting;
1516
using Microsoft.AspNetCore.Authentication.OpenIdConnect;

4-WebApp-your-API/4-1-MyOrg/TodoListService/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.Extensions.Configuration;
88
using Microsoft.Extensions.DependencyInjection;
99
using Microsoft.Identity.Web;
10+
1011
using Microsoft.AspNetCore.Authentication.JwtBearer;
1112

1213
namespace TodoListService

0 commit comments

Comments
 (0)