* fix on posting
This commit is contained in:
Sebastian Marcet 2014-11-28 16:31:49 -03:00
parent 98147c84d7
commit 1bc3cd385b
2 changed files with 14 additions and 6 deletions

View File

@ -26,6 +26,6 @@ final class SapphireEventPublishingService implements IEventPublishingService {
if(!$parent) throw new NotFoundEntityException('EventHolder','');
$event->setParent($parent); // Should set the ID once the Holder is created...
$event->write();
$event->doPublish();
//$event->doPublish();
}
}

View File

@ -101,9 +101,13 @@ final class EventRegistrationRequestCrudApi
return $this->ok();
}
catch(NotFoundEntityException $ex1){
SS_Log::log($ex1,SS_Log::ERR);
SS_Log::log($ex1,SS_Log::WARN);
return $this->notFound($ex1->getMessage());
}
catch(EntityValidationException $ex2){
SS_Log::log($ex2,SS_Log::WARN);
return $this->validationError($ex2->getMessages());
}
catch(Exception $ex){
SS_Log::log($ex,SS_Log::ERR);
return $this->serverError();
@ -118,7 +122,7 @@ final class EventRegistrationRequestCrudApi
return $this->ok(EventsAssembler::convertEventRegistrationRequestToArray($request));
}
catch(NotFoundEntityException $ex1){
SS_Log::log($ex1,SS_Log::ERR);
SS_Log::log($ex1,SS_Log::WARN);
return $this->notFound($ex1->getMessage());
}
catch(Exception $ex){
@ -135,11 +139,11 @@ final class EventRegistrationRequestCrudApi
return $this->updated();
}
catch(NotFoundEntityException $ex1){
SS_Log::log($ex1,SS_Log::ERR);
SS_Log::log($ex1,SS_Log::WARN);
return $this->notFound($ex1->getMessage());
}
catch (EntityValidationException $ex2) {
SS_Log::log($ex2,SS_Log::ERR);
SS_Log::log($ex2,SS_Log::WARN);
return $this->validationError($ex2->getMessages());
}
catch(Exception $ex){
@ -157,9 +161,13 @@ final class EventRegistrationRequestCrudApi
return $this->updated();
}
catch(NotFoundEntityException $ex1){
SS_Log::log($ex1,SS_Log::ERR);
SS_Log::log($ex1,SS_Log::WARN);
return $this->notFound($ex1->getMessage());
}
catch(EntityValidationException $ex2){
SS_Log::log($ex2,SS_Log::WARN);
return $this->validationError($ex2->getMessages());
}
catch(Exception $ex){
SS_Log::log($ex,SS_Log::ERR);
return $this->serverError();