Skip to content

Commit

Permalink
Merge pull request #20 from h4570/develop
Browse files Browse the repository at this point in the history
Login fixes 2
  • Loading branch information
h4570 authored Jan 26, 2022
2 parents dc08cf0 + c49bbc6 commit ebaf7da
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/WebApi/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class UserController : ControllerBase
private readonly ConfigEnvironment _config;
private readonly AppDbContext _context;

public UserController(DbContextOptions<AppDbContext> options, IOptions<ConfigEnvironment> config, ILogger logger)
public UserController(DbContextOptions<AppDbContext> options, IOptions<ConfigEnvironment> config, ILogger<UserController> logger)
{
_config = config.Value;
_context = new AppDbContext(options);
Expand Down
1 change: 1 addition & 0 deletions backend/WebApi/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public async Task<User> ComputePasswordHashAndAddUser(User user, ConfigEnvironme
{
user.Password = AuthUtilities.ComputeSha256Hash(user.Password, config.Salt);
await _context.Users.AddAsync(user);
_logger.LogInformation($"Registered user with password: {user.Password.Substring(0, 5)}...");
await _context.SaveChangesAsync();
return user;
}
Expand Down
Binary file removed backend/WebApi/armnas.db
Binary file not shown.

0 comments on commit ebaf7da

Please sign in to comment.