From e1097460591997a2f6f4a5da66a595b423b875d9 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Mon, 17 Jun 2024 18:29:18 +0400 Subject: [PATCH] fix registration (now return jwt) --- BusinessLogic/BusinessLogic/UserLogic.cs | 4 ++-- Contracts/BusinessLogicContracts/IUserLogic.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BusinessLogic/BusinessLogic/UserLogic.cs b/BusinessLogic/BusinessLogic/UserLogic.cs index 63e8130..7e22df0 100644 --- a/BusinessLogic/BusinessLogic/UserLogic.cs +++ b/BusinessLogic/BusinessLogic/UserLogic.cs @@ -32,7 +32,7 @@ namespace BusinessLogic.BusinessLogic _userStorage = userStorage; } - public UserViewModel Create(UserBindingModel model) + public string Create(UserBindingModel model) { // Проверяем модель _validate(model); @@ -51,7 +51,7 @@ namespace BusinessLogic.BusinessLogic MailSender.Send(new MailRegistration(user)); - return UserConverter.ToView(user); + return JwtProvider.Generate(user); } public UserViewModel Delete(UserSearchModel model) diff --git a/Contracts/BusinessLogicContracts/IUserLogic.cs b/Contracts/BusinessLogicContracts/IUserLogic.cs index dc5c87a..664b346 100644 --- a/Contracts/BusinessLogicContracts/IUserLogic.cs +++ b/Contracts/BusinessLogicContracts/IUserLogic.cs @@ -14,7 +14,7 @@ namespace Contracts.BusinessLogicContracts { string Login(string email, string password); - UserViewModel Create(UserBindingModel model); + string Create(UserBindingModel model); UserViewModel Update(UserBindingModel model);