Esempio n. 1
0
 public function authorizedForAdmin(UserService $user)
 {
     try {
         $email = $user->getUserByToken()['email'];
         if ($email == '*****@*****.**' || $email == '*****@*****.**' || $email == '*****@*****.**' || $email == '*****@*****.**') {
             return $this->json_response->success([]);
         }
         return $this->json_response->error([]);
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }
Esempio n. 2
0
 public function userUnBookMarkJob(UserService $user, $user_id, $bookmark_id)
 {
     try {
         $user->unBookMarkCompanyJob($bookmark_id);
         return $this->json_response->success();
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }
Esempio n. 3
0
 public function getUserSoftSkills(UserService $user, SkillService $skill, $user_id)
 {
     try {
         $query = ['select' => 'id', 'whereNotIn' => [], 'list' => true];
         $skill_ids = $skill->getSkillsByType('soft', $query);
         return $this->json_response->success($user->getAllUserSkillsByType($user_id, $skill_ids));
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }