diff options
Diffstat (limited to 'src/DevHive.Web/Controllers/UserController.cs')
| -rw-r--r-- | src/DevHive.Web/Controllers/UserController.cs | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/DevHive.Web/Controllers/UserController.cs b/src/DevHive.Web/Controllers/UserController.cs new file mode 100644 index 0000000..84231d1 --- /dev/null +++ b/src/DevHive.Web/Controllers/UserController.cs @@ -0,0 +1,66 @@ +using System; +using System.Threading.Tasks; +using AutoMapper; +using DevHive.Data.Repositories; +using DevHive.Services.Models.Identity; +using DevHive.Services.Options; +using DevHive.Services.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace DevHive.Web.Controllers +{ + [ApiController] + [Route("/api/[controller]")] + public class UserController: ControllerBase + { + private readonly UserService _service; + + public UserController(DevHiveContext context, IMapper mapper, JWTOptions jwtOptions) + { + //this._service = new UserService(context, mapper, jwtOptions); + } + + [HttpPost] + [Route("Login")] + public async Task<IActionResult> Login([FromBody] LoginServiceModel loginServiceModel) + { + //return await this._service.LoginUser(loginDTO); + throw new NotImplementedException(); + } + + [HttpPost] + [Route("Register")] + public async Task<IActionResult> Register([FromBody] RegisterServiceModel registerServiceModel) + { + //return await this._service.RegisterUser(registerDto); + throw new NotImplementedException(); + } + + //Read + [HttpGet] + public async Task<IActionResult> GetById(Guid id) + { + //return await this._service.GetUserById(id); + throw new NotImplementedException(); + } + + //Update + [HttpPut] + [Authorize] + public async Task<IActionResult> Update(Guid id, [FromBody] UpdateUserServiceModel updateUserServiceModel) + { + //return await this._service.UpdateUser(id, userDTO); + throw new NotImplementedException(); + } + + //Delete + [HttpDelete] + [Authorize] + public async Task<IActionResult> Delete(Guid id) + { + //return await this._service.DeleteUser(id); + throw new NotImplementedException(); + } + } +} |
