public IActionResult addUserPost([FromBody] string username) { username.Trim('"'); if (UserDatabaseAccess.CheckUserByUsername(username) == true) { return(StatusCode(403, "Oops.This username is already in use. Please try again with a new username.")); } if (username == "") { return(BadRequest("Oops.Make sure your body contains a string with your username and your Content - Type is Content - Type:application / json")); } User user = UserDatabaseAccess.addUserPost(username); return(Ok(user.ApiKey)); }