Add global usings
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Todo.Core.Entities;
|
||||
using Todo.Core.Interfaces.Persistence;
|
||||
|
||||
namespace Todo.Api.Controllers
|
||||
@@ -20,12 +18,6 @@ namespace Todo.Api.Controllers
|
||||
_userRepository = userRepository;
|
||||
}
|
||||
|
||||
public record RegisterUserRequest
|
||||
{
|
||||
[Required] public string Email { get; init; }
|
||||
[Required] public string Password { get; init; }
|
||||
}
|
||||
|
||||
[HttpPost("register")]
|
||||
public async Task<IActionResult> Register([FromBody] RegisterUserRequest request)
|
||||
{
|
||||
@@ -33,5 +25,11 @@ namespace Todo.Api.Controllers
|
||||
|
||||
return Ok(user);
|
||||
}
|
||||
|
||||
public record RegisterUserRequest
|
||||
{
|
||||
[Required] public string Email { get; init; }
|
||||
[Required] public string Password { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user