public ActionResult Jobs(int[] skillsId, string keyWords, int priceFrom = 0) { int[] employeeSkills = null; if (User.Identity.IsAuthenticated) { string userId = User.Identity.GetUserId(); bool employeeExists = _employeeService.EmployeeProfileExists(userId); if (employeeExists) { var employee = _employeeService.FindEmployee(userId); employeeSkills = employee.Skills.Select(p => p.Id).ToArray(); } } var jobs = _jobService.FindRelevantJobs(skillsId, keyWords, priceFrom, employeeSkills); return(Json(jobs)); }
public ActionResult ProfileExists(string userId) { bool exists = _employeeService.EmployeeProfileExists(userId); return(Json(exists)); }