feat: secrets file

This commit is contained in:
Stavros
2025-01-26 19:48:53 +02:00
parent 3b50d9303b
commit 94f7debb10
5 changed files with 86 additions and 51 deletions

View File

@@ -31,7 +31,7 @@ func (auth *Auth) GetUser(username string) *types.User {
}
func (auth *Auth) CheckPassword(user types.User, password string) bool {
hashedPasswordErr := bcrypt.CompareHashAndPassword([]byte(user.Username), []byte(password))
hashedPasswordErr := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(password))
return hashedPasswordErr == nil
}