public IActionResult GiveALike(int skateboardId) { ProfileController profileController = new ProfileController(_dbService); int currentUserId = profileController.GetCurrentUser().UserId; if (checkLike(skateboardId, currentUserId).Equals(false)) { return(RedirectToAction("Skateboards")); } else { _dbService.GiveALike(currentUserId, skateboardId); return(RedirectToAction("Skateboards")); } }
public List <Skateboard> GetUserSkateboards() { ProfileController profileController = new ProfileController(_dbService); return(_dbService.GetUserSkateboards(profileController.GetCurrentUser().UserId)); }