Ejemplo n.º 1
0
 public function updateCompanyJobSkillImportance(CompanyService $company, $user_id, $company_id, $job_id, $skill_id = null)
 {
     $retrieve = ['importance', 'type'];
     try {
         $input = Request::only($retrieve);
         if ($input['type'] == 'skill') {
             $response = $company->updateCompanyJobSkillImportance($skill_id, $input);
         } else {
             $response = $company->updateCompanyJobTraitImportance($job_id, $input['importance']);
         }
         if (!empty($response)) {
             return $this->json_response->success($response);
         }
         return $this->json_response->error($response);
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }