public async Task <ActionResult <View.ViewUser> > Post(View.ViewUser user)
 {
     try
     {
         if (await _registerRepostiry.RegisterAccount(user.Username, user.Password))
         {
             return(Ok("Your account has succesfully been registered."));
         }
         else
         {
             return(BadRequest("Something went wrong, please try again at a later date."));
         }
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Esempio n. 2
0
 public bool Register(AuthEntity user)
 {
     return(_register.RegisterAccount(user));
 }