From dee2e37a4a8759108390c664e06bf147b8385cbf Mon Sep 17 00:00:00 2001 From: transtrike Date: Mon, 14 Dec 2020 23:29:14 +0200 Subject: Stabalized project for compilation. Next step after init architecture --- src/DevHive.Web/Controllers/UserController.cs | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/DevHive.Web/Controllers/UserController.cs (limited to 'src/DevHive.Web/Controllers/UserController.cs') 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 Login([FromBody] LoginServiceModel loginServiceModel) + { + //return await this._service.LoginUser(loginDTO); + throw new NotImplementedException(); + } + + [HttpPost] + [Route("Register")] + public async Task Register([FromBody] RegisterServiceModel registerServiceModel) + { + //return await this._service.RegisterUser(registerDto); + throw new NotImplementedException(); + } + + //Read + [HttpGet] + public async Task GetById(Guid id) + { + //return await this._service.GetUserById(id); + throw new NotImplementedException(); + } + + //Update + [HttpPut] + [Authorize] + public async Task Update(Guid id, [FromBody] UpdateUserServiceModel updateUserServiceModel) + { + //return await this._service.UpdateUser(id, userDTO); + throw new NotImplementedException(); + } + + //Delete + [HttpDelete] + [Authorize] + public async Task Delete(Guid id) + { + //return await this._service.DeleteUser(id); + throw new NotImplementedException(); + } + } +} -- cgit v1.2.3