diff --git a/Weiferl.Api/Controllers/Users.cs b/Weiferl.Api/Controllers/Users.cs index d69bd3d..0295785 100644 --- a/Weiferl.Api/Controllers/Users.cs +++ b/Weiferl.Api/Controllers/Users.cs @@ -44,22 +44,13 @@ namespace Weiferl.Api.Controllers } [HttpPost("addUser")] - public async Task AddUser() + public async Task AddUser([FromBody] User user) { - var user = new User - { - UserId = Guid.NewGuid(), - Firstname = "Marcus", - Lastname = "Ferl", - Birthday = new DateTime(1986, 01, 17), - Email = "marcus@weifer.de", - IsDeleted = false, - RegisterDate = DateTime.Now, - CountrySlug = "DE" - }; - try { + user.UserId = Guid.NewGuid(); + user.RegisterDate = DateTime.Now; + user.IsDeleted = false; await userRepo.CreateUser(user); return Ok(); } @@ -68,6 +59,7 @@ namespace Weiferl.Api.Controllers return BadRequest(ex); } } + [HttpPost("updateUser")] public async Task UpdateUser() {