File tree 4 files changed +11
-8
lines changed
CheckDrive.Web/CheckDrive.Web
4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
- using CheckDrive . Web . Stores . User ;
1
+ using CheckDrive . ApiContracts . Account ;
2
+ using CheckDrive . Web . Stores . User ;
2
3
using CheckDrive . Web . ViewModels ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using System . IdentityModel . Tokens . Jwt ;
@@ -52,14 +53,14 @@ public IActionResult Index()
52
53
}
53
54
54
55
[ HttpPost ]
55
- public async Task < IActionResult > Index ( LoginViewModel loginViewModel )
56
+ public async Task < IActionResult > Index ( AccountForLoginDto loginViewModel )
56
57
{
57
58
if ( ! ModelState . IsValid )
58
59
{
59
60
return View ( loginViewModel ) ;
60
61
}
61
62
62
- var user = new LoginViewModel
63
+ var user = new AccountForLoginDto
63
64
{
64
65
Login = loginViewModel . Login ,
65
66
Password = loginViewModel . Password ,
Original file line number Diff line number Diff line change 1
- using CheckDrive . Web . ViewModels ;
1
+ using CheckDrive . ApiContracts . Account ;
2
+ using CheckDrive . Web . ViewModels ;
2
3
3
4
namespace CheckDrive . Web . Stores . User
4
5
{
5
6
public interface IUserDataStore
6
7
{
7
- public Task < ( bool Success , string Token ) > AuthenticateLoginAsync ( LoginViewModel loginViewModel ) ;
8
+ public Task < ( bool Success , string Token ) > AuthenticateLoginAsync ( AccountForLoginDto loginViewModel ) ;
8
9
}
9
10
}
Original file line number Diff line number Diff line change 1
- using CheckDrive . Web . Service ;
1
+ using CheckDrive . ApiContracts . Account ;
2
+ using CheckDrive . Web . Service ;
2
3
using CheckDrive . Web . ViewModels ;
3
4
using Newtonsoft . Json ;
4
5
using System . Text ;
@@ -12,7 +13,7 @@ public UserDataStore(ApiClient apiClient)
12
13
{
13
14
_apiClient = apiClient ;
14
15
}
15
- public async Task < ( bool Success , string Token ) > AuthenticateLoginAsync ( LoginViewModel loginViewModel )
16
+ public async Task < ( bool Success , string Token ) > AuthenticateLoginAsync ( AccountForLoginDto loginViewModel )
16
17
{
17
18
var json = JsonConvert . SerializeObject ( loginViewModel ) ;
18
19
var content = new StringContent ( json , Encoding . UTF8 , "application/json" ) ;
Original file line number Diff line number Diff line change 1
- @model CheckDrive .Web . ViewModels . LoginViewModel
1
+ @model CheckDrive .ApiContracts . Account . AccountForLoginDto
2
2
3
3
@{
4
4
ViewData [" Title" ] = " Index" ;
You can’t perform that action at this time.
0 commit comments