From 67cd4a82c39e6492ab2e0cf6ccf037575f73b0d0 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Sun, 19 Apr 2020 18:17:18 +0100 Subject: [PATCH] Use new urls for user auth --- src/Website.Tests/Data/AuthenticationProviderTests.cs | 4 ++-- src/Website/Data/AuthenticationProvider.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Website.Tests/Data/AuthenticationProviderTests.cs b/src/Website.Tests/Data/AuthenticationProviderTests.cs index b30a02a..3e5fc45 100644 --- a/src/Website.Tests/Data/AuthenticationProviderTests.cs +++ b/src/Website.Tests/Data/AuthenticationProviderTests.cs @@ -15,7 +15,7 @@ namespace Website.Tests.Data { const string json = @"{""username"":""username"",""password"":""password""}"; var httpClient = new HttpClientBuilder() .WithMethod(HttpMethod.Post) - .WithUrl("/authenticate") + .WithUrl("/user/authenticate") .WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}") .WithResponse(json) .Build(); @@ -41,7 +41,7 @@ namespace Website.Tests.Data { const string json = @"{""username"":""username"",""password"":""password""}"; var httpClient = new HttpClientBuilder() .WithMethod(HttpMethod.Post) - .WithUrl("/authenticate") + .WithUrl("/user/authenticate") .WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}") .WithErrorStatus(HttpStatusCode.Unauthorized) .WithResponse(json) diff --git a/src/Website/Data/AuthenticationProvider.cs b/src/Website/Data/AuthenticationProvider.cs index c27d45a..83b87e1 100644 --- a/src/Website/Data/AuthenticationProvider.cs +++ b/src/Website/Data/AuthenticationProvider.cs @@ -10,7 +10,7 @@ namespace Website.Data { public async Task Authenticate(LoginRequest request) { try { - return await Post("authenticate", request); + return await Post("/user/authenticate", request); } catch (ApiCallException) { return null;