public IActionResult Get() { User user = DBWorker.GetExistingUser("*****@*****.**", "ivan12345"); var routes = _db.Routes.Where(r => r.UserId == user.Id).ToList(); return(Ok(routes)); }
private static void Login() { while (true) { string email = GetData("email"); string pass = GetData("password"); User user = DBWorker.GetExistingUser(email, pass); if (user != null) { CurrentUser = user; break; } else { ConsoleDrawer.DrawMessage(new OperationStatusMessage("INCORRECT EMAIL OR PASSWORD!", "ERROR")); } } }
public string Get() { User user = DBWorker.GetExistingUser("*****@*****.**", "ivan12345"); return(JsonConvert.SerializeObject(DataBase.Routes.Where(r => r.UserId == user.Id).ToList())); }