Beispiel #1
0
        public IActionResult Delete(string email)
        {
            var AuxUser = UserDataBase.GetUser(email);

            if (AuxUser == null)
            {
                return(NotFound());
            }
            else if (!UserDataBase.DeleteUser(email))
            {
                return(BadRequest());
            }
            return(Ok());
        }
Beispiel #2
0
 public ActionResult <User> Get(string email)
 {
     try
     {
         var AuxUser = UserDataBase.GetUser(email).First();
         if (AuxUser == null)
         {
             return(BadRequest());
         }
         return(Ok(AuxUser));
     }
     catch (InvalidOperationException)
     {
         return(NotFound());
     }
 }
Beispiel #3
0
 public void GetUser(long login)
 {
     activeUser = dataBase.GetUser(login);
 }