creating UpdateLoginEndpoint.cs
This commit is contained in:
@@ -3,6 +3,7 @@ using ApiEfCoreLibrary.DTO.Login.Response;
|
|||||||
using ApiEfCoreLibrary.DTO.Book.Response;
|
using ApiEfCoreLibrary.DTO.Book.Response;
|
||||||
using FastEndpoints;
|
using FastEndpoints;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PasswordGenerator;
|
||||||
|
|
||||||
namespace ApiEfCoreLibrary.Endpoints.Login;
|
namespace ApiEfCoreLibrary.Endpoints.Login;
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ public class UpdateLoginEndpoint(LibraryDbContext database) : Endpoint<UpdateLog
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string? salt = BCrypt.Net.BCrypt.GenerateSalt(24);
|
string? salt = new Password().IncludeLowercase().IncludeUppercase().IncludeNumeric().LengthRequired(24).Next();
|
||||||
|
|
||||||
login.Username = req.Username;
|
login.Username = req.Username;
|
||||||
login.FullName = req.FullName;
|
login.FullName = req.FullName;
|
||||||
|
Reference in New Issue
Block a user