public void MakeUserManager([FromBody] EmployeeIdVM employee) { //This method simply strips the Employee role from the user and then adds on the Manager role UserRoleRepo repo = new UserRoleRepo(service); repo.RemoveUserRole(employee.Email, "Employee").Wait(); repo.AddUserRole(employee.Email, "Manager").Wait(); }
public void DeleteUser([FromBody] EmployeeIdVM employee) { var token = Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); if (PatManagerVerify.CheckIfManager(token, context)) { UserRepo repo = new UserRepo(context, service); repo.DeleteUser(employee.Email); } }