// POST: api/UserLogin public User Post([FromBody] UserLogin UserLogin) { udc = new UserDbConnection(); User user = udc.GetUser(UserLogin.Username, SHA.GenerateSHA256String(UserLogin.Password)); return(user); }
// POST: api/UserSignUp public User Post([FromBody] UserSignUp userSignUp) { udc = new UserDbConnection(); if (userSignUp.Username != null && userSignUp.Password != null && userSignUp.PasswordConfirmation == userSignUp.Password) { udc.InsertUser(userSignUp.Username, SHA.GenerateSHA256String(userSignUp.Password)); } User user = udc.GetUser(userSignUp.Username, SHA.GenerateSHA256String(userSignUp.Password)); return(user); }