Refactoring, database structure changed

This commit is contained in:
2025-03-03 00:56:32 +01:00
Unverified
parent d3805ef3db
commit c603c41c0b
913 changed files with 21764 additions and 32775 deletions

View File

@@ -0,0 +1,24 @@
using Ardalis.Result;
using Ardalis.Result.AspNetCore;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WatchIt.DTO.Models.Controllers.Accounts.Account;
using WatchIt.DTO.Models.Controllers.Authentication;
using WatchIt.WebAPI.BusinessLogic.Authentication;
namespace WatchIt.WebAPI.Controllers;
[ApiController]
[Route("authentication")]
public class AuthenticationController(IAuthenticationBusinessLogic authenticationBusinessLogic) : ControllerBase
{
[HttpPost("authenticate")]
[AllowAnonymous]
[TranslateResultToActionResult]
public async Task<Result<AuthenticationResponse>> Authenticate([FromBody]AuthenticationRequest body) => await authenticationBusinessLogic.Authenticate(body);
[HttpPost("authenticate_refresh")]
[AllowAnonymous]
[TranslateResultToActionResult]
public async Task<Result<AuthenticationResponse>> AuthenticateRefresh([FromBody]AuthenticationRefreshRequest body) => await authenticationBusinessLogic.AuthenticateRefresh(body);
}