wip
This commit is contained in:
parent
cb9d5e332e
commit
baea64229b
9 changed files with 69 additions and 11 deletions
|
@ -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")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue