This commit is contained in:
john 2025-05-12 09:33:07 +02:00
parent cb9d5e332e
commit baea64229b
9 changed files with 69 additions and 11 deletions

View file

@ -1,15 +1,20 @@
using Femto.Modules.Authentication.Application;
using Microsoft.AspNetCore.Mvc;
namespace Femto.Api.Controllers.Auth;
[ApiController]
[Route("auth")]
public class AuthController : ControllerBase
public class AuthController(IAuthenticationModule authModule) : ControllerBase
{
[HttpPost("login")]
public async Task<ActionResult<LoginResponse>> Login([FromBody] LoginRequest request)
{
return new LoginResponse(Guid.Parse("0196960c-6296-7532-ba66-8fabb38c6ae0"), "johnbotris", "token");
var userId = await authModule.PostCommand(new LoginCommand(request.Username, request.Password));
throw new NotImplementedException();
}
[HttpPost("signup")]