Notes update + await warnings fix
parent
9259a53672
commit
62be9f4a50
|
@ -32,7 +32,7 @@ namespace NetworkResurrector.Application.Services
|
|||
return null;
|
||||
|
||||
var token = $"{Guid.NewGuid()}-{Guid.NewGuid()}-{user.UserId}";
|
||||
_securityStore.SetToken(token, user.UserId);
|
||||
await Task.Run(() =>_securityStore.SetToken(token, user.UserId));
|
||||
|
||||
var securityToken = new SecurityToken() { UserId = user.UserId, Token = token };
|
||||
return securityToken;
|
||||
|
@ -40,7 +40,7 @@ namespace NetworkResurrector.Application.Services
|
|||
|
||||
public async Task<User> Authenticate(string token)
|
||||
{
|
||||
var tokenValidation = _securityStore.ValidateToken(token);
|
||||
var tokenValidation = await Task.Run(() => _securityStore.ValidateToken(token));
|
||||
if (tokenValidation.Success)
|
||||
{
|
||||
var user = _paramProvider.Users.FirstOrDefault(z => z.UserId == tokenValidation.UserId);
|
||||
|
|
|
@ -1,2 +1,9 @@
|
|||
https://github.com/nikeee/wake-on-lan
|
||||
|
||||
#######################################################################################################################################################
|
||||
Publish:
|
||||
dotnet publish --configuration Release --runtime win7-x64
|
||||
|
||||
Create windows service:
|
||||
sc create NetworkResurrector.Api binPath= "<path_to_the_service_executable>"
|
||||
#######################################################################################################################################################
|
Loading…
Reference in New Issue