From 7bff14a66e01d169d6e6080502ca70e98e1bbdf0 Mon Sep 17 00:00:00 2001 From: shept Date: Fri, 18 Apr 2025 14:15:52 +0500 Subject: [PATCH] =?UTF-8?q?bub=20fix=20=F0=9F=A5=BA=20created=20authorizat?= =?UTF-8?q?ion=20service=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SurveyBackend/SurveyBackend.API/Program.cs | 2 +- .../SurveyBackend.Core/Services/IAuthorizationService.cs | 9 +++++++++ .../Services/AuthorizationService.cs | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 SurveyBackend/SurveyBackend.Core/Services/IAuthorizationService.cs diff --git a/SurveyBackend/SurveyBackend.API/Program.cs b/SurveyBackend/SurveyBackend.API/Program.cs index 77e7695..d56c7ab 100644 --- a/SurveyBackend/SurveyBackend.API/Program.cs +++ b/SurveyBackend/SurveyBackend.API/Program.cs @@ -37,7 +37,7 @@ public class Program builder.Services.AddScoped(); - builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); diff --git a/SurveyBackend/SurveyBackend.Core/Services/IAuthorizationService.cs b/SurveyBackend/SurveyBackend.Core/Services/IAuthorizationService.cs new file mode 100644 index 0000000..1767ce2 --- /dev/null +++ b/SurveyBackend/SurveyBackend.Core/Services/IAuthorizationService.cs @@ -0,0 +1,9 @@ +using SurveyBackend.Core.Models; + +namespace SurveyBackend.Core.Services; + +public interface IAuthorizationService +{ + public Task LogInUser(string email, string password); + public Task RegisterUser(User user); +} \ No newline at end of file diff --git a/SurveyBackend/SurveyBackend.Services/Services/AuthorizationService.cs b/SurveyBackend/SurveyBackend.Services/Services/AuthorizationService.cs index 25fcbdf..0e9907f 100644 --- a/SurveyBackend/SurveyBackend.Services/Services/AuthorizationService.cs +++ b/SurveyBackend/SurveyBackend.Services/Services/AuthorizationService.cs @@ -4,7 +4,7 @@ using SurveyBackend.Services.Helpers; namespace SurveyBackend.Services.Services; -public class AuthorizationService +public class AuthorizationService : IAuthorizationService { private readonly IUserService _userService; private readonly IPasswordHasher _passwordHasher;