Use new urls for user auth

This commit is contained in:
Robert Marshall 2020-04-19 18:17:18 +01:00
parent d42cbdf78f
commit 67cd4a82c3
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -10,7 +10,7 @@ namespace Website.Data {
public async Task<User> Authenticate(LoginRequest request) {
try {
return await Post<User>("authenticate", request);
return await Post<User>("/user/authenticate", request);
}
catch (ApiCallException) {
return null;