public void MakeCarPayed()
        {
            var user = HttpContext.User.Claims.First(c => c.Type == ClaimTypes.Email).Value;

            _userService.MakeCarPayed();
            _userService.CreateTransaction(user);
            _userService.CreateUserActivity(user, "Ordered a car " + DateTime.Now);
        }
        public List <UserActivityModel> ShowUserActivities()
        {
            var user = HttpContext.User.Claims.First(c => c.Type == ClaimTypes.Email).Value;

            _userService.CreateUserActivity(user, "Admin requested user activities " + DateTime.Now);
            return(_userService.GetAllUserActivity());
        }
Beispiel #3
0
 public void Register([FromForm] string username, [FromForm] string password)
 {
     _userService.Register(username, password, "user");
     _userService.CreateUserActivity(username, "User registered " + DateTime.Now);
 }
Beispiel #4
0
 public void AddCarToUser([FromForm] string username, [FromForm] string carmodel, [FromForm] string carcolor, [FromForm] string carwheel)
 {
     Console.WriteLine("CarModelController: " + username + " " + carmodel + " " + carcolor + " " + carwheel);
     _userService.AddModelToUser(username, carmodel, carcolor, carwheel);
     _userService.CreateUserActivity(username, "Registered a car " + DateTime.Now);
 }