Esempio n. 1
0
 public IActionResult Post([FromBody] User user)
 {
     if (string.IsNullOrEmpty(user.Name))
     {
         return(StatusCode(400, "Invalid user name parameter."));
     }
     if (_loginService.AddNewUser(user.Name))
     {
         return(Ok());
     }
     return(StatusCode(403, "Duplicate user name."));
 }