femto-backend/Femto.Api/Controllers/Auth/AuthController.cs
2025-05-12 09:33:07 +02:00

32 lines
No EOL
877 B
C#

using Femto.Modules.Authentication.Application;
using Microsoft.AspNetCore.Mvc;
namespace Femto.Api.Controllers.Auth;
[ApiController]
[Route("auth")]
public class AuthController(IAuthenticationModule authModule) : ControllerBase
{
[HttpPost("login")]
public async Task<ActionResult<LoginResponse>> Login([FromBody] LoginRequest request)
{
var userId = await authModule.PostCommand(new LoginCommand(request.Username, request.Password));
throw new NotImplementedException();
}
[HttpPost("signup")]
public async Task<ActionResult<SignupResponse>> Signup([FromBody] SignupRequest request)
{
throw new NotImplementedException();
}
[HttpPost("delete-session")]
public async Task<ActionResult> DeleteSession([FromBody] DeleteSessionRequest request)
{
// TODO
return Ok(new {});
}
}