예제 #1
0
파일: App.php 프로젝트: df-arif/df-core
 /**
  * Handles PATCH action
  *
  * @return \DreamFactory\Core\Utility\ServiceResponse
  * @throws BadRequestException
  * @throws \Exception
  */
 protected function handlePATCH()
 {
     if (!empty($this->resource)) {
         if ($this->request->getParameterAsBool(ApiOptions::REGENERATE)) {
             /** @var AppModel $appClass */
             $appClass = $this->model;
             $app = $appClass::find($this->resource)->first();
             $app->api_key = $appClass::generateApiKey($app->name);
             $app->save();
         }
     }
     return parent::handlePATCH();
 }
예제 #2
0
파일: User.php 프로젝트: df-arif/df-user
 /**
  * {@inheritdoc}
  */
 protected function handlePATCH()
 {
     return $this->handleInvitation(parent::handlePATCH());
 }