Use new urls for user auth
This commit is contained in:
parent
d42cbdf78f
commit
67cd4a82c3
2 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ namespace Website.Tests.Data {
|
||||||
const string json = @"{""username"":""username"",""password"":""password""}";
|
const string json = @"{""username"":""username"",""password"":""password""}";
|
||||||
var httpClient = new HttpClientBuilder()
|
var httpClient = new HttpClientBuilder()
|
||||||
.WithMethod(HttpMethod.Post)
|
.WithMethod(HttpMethod.Post)
|
||||||
.WithUrl("/authenticate")
|
.WithUrl("/user/authenticate")
|
||||||
.WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}")
|
.WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}")
|
||||||
.WithResponse(json)
|
.WithResponse(json)
|
||||||
.Build();
|
.Build();
|
||||||
|
@ -41,7 +41,7 @@ namespace Website.Tests.Data {
|
||||||
const string json = @"{""username"":""username"",""password"":""password""}";
|
const string json = @"{""username"":""username"",""password"":""password""}";
|
||||||
var httpClient = new HttpClientBuilder()
|
var httpClient = new HttpClientBuilder()
|
||||||
.WithMethod(HttpMethod.Post)
|
.WithMethod(HttpMethod.Post)
|
||||||
.WithUrl("/authenticate")
|
.WithUrl("/user/authenticate")
|
||||||
.WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}")
|
.WithPostBody(@"{""Username"":""username"",""Password"":""password"",""ReturnUrl"":null}")
|
||||||
.WithErrorStatus(HttpStatusCode.Unauthorized)
|
.WithErrorStatus(HttpStatusCode.Unauthorized)
|
||||||
.WithResponse(json)
|
.WithResponse(json)
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Website.Data {
|
||||||
|
|
||||||
public async Task<User> Authenticate(LoginRequest request) {
|
public async Task<User> Authenticate(LoginRequest request) {
|
||||||
try {
|
try {
|
||||||
return await Post<User>("authenticate", request);
|
return await Post<User>("/user/authenticate", request);
|
||||||
}
|
}
|
||||||
catch (ApiCallException) {
|
catch (ApiCallException) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue