Example #1
0
 /**
  * @param \Seat\Web\Validation\ApiKey       $request
  * @param \Seat\Eveapi\Helpers\JobContainer $job
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function addKey(ApiKey $request, JobContainer $job)
 {
     ApiKeyModel::create(['key_id' => $request->input('key_id'), 'v_code' => $request->input('v_code'), 'user_id' => auth()->user()->id, 'enabled' => true]);
     // Get a fresh instance of the API Key
     $api_key = ApiKeyModel::find($request->input('key_id'));
     $job->scope = 'Key';
     $job->api = 'Scheduler';
     $job->owner_id = $request->input('key_id');
     $job->eve_api_key = $api_key;
     // Queue the update Job
     $job_id = $this->addUniqueJob(CheckAndQueueKey::class, $job);
     return redirect()->route('api.key')->with('success', trans('web::seat.add_success', ['jobid' => $job_id]));
 }
Example #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param \Seat\Web\Validation\ApiKey $request
  *
  * @return \Illuminate\Http\Response
  */
 public function store(ApiKeyValidator $request)
 {
     ApiKey::create($request->all());
     return response()->json(['ok']);
 }
Example #3
0
 /**
  * @param \Seat\Web\Validation\ApiKey $request
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function addKey(ApiKey $request)
 {
     ApiKeyModel::create(['key_id' => $request->input('key_id'), 'v_code' => $request->input('v_code'), 'user_id' => auth()->user()->id, 'enabled' => true]);
     return redirect()->route('api.key')->with('success', trans('web::api.add_success'));
 }