Added endpoint to get/delete rsvp template by id
GET /api/v1/summits/{id}/rsvp-templates/{template_id} DELETE /api/v1/summits/{id}/rsvp-templates/{template_id} Change-Id: If15452ff22407378016202ecac915a3047b667fa
This commit is contained in:
parent
d8a855f43a
commit
fba29fb43c
@ -223,7 +223,7 @@ final class OAuth2MembersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateAffiliation($member_id, $affiliation_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$member = $this->repository->getById($member_id);
|
||||
|
@ -185,8 +185,7 @@ final class OAuth2TeamsApiController extends OAuth2ProtectedController
|
||||
public function addTeam(){
|
||||
try {
|
||||
|
||||
if(!Request::isJson())
|
||||
return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -276,8 +275,7 @@ final class OAuth2TeamsApiController extends OAuth2ProtectedController
|
||||
public function updateTeam($team_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson())
|
||||
return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -429,8 +427,7 @@ final class OAuth2TeamsApiController extends OAuth2ProtectedController
|
||||
public function postTeamMessage($team_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson())
|
||||
return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -485,8 +482,7 @@ final class OAuth2TeamsApiController extends OAuth2ProtectedController
|
||||
public function addMember2MyTeam($team_id, $member_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson())
|
||||
return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
|
@ -114,10 +114,7 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if (!$request->isJson()) {
|
||||
return $this->error412(array('invalid content type!'));
|
||||
}
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -166,10 +163,7 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if (!$request->isJson()) {
|
||||
return $this->error412(array('invalid content type!'));
|
||||
}
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
|
@ -440,7 +440,7 @@ final class OAuth2SummitAttendeesApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addAttendee($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -522,7 +522,7 @@ final class OAuth2SummitAttendeesApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateAttendee($summit_id, $attendee_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -576,7 +576,7 @@ final class OAuth2SummitAttendeesApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addAttendeeTicket($summit_id, $attendee_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
|
@ -327,11 +327,10 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
try {
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$rules = [
|
||||
|
||||
'title' => 'required|string|max:100',
|
||||
'description' => 'required|string',
|
||||
'type_id' => 'required|integer',
|
||||
@ -405,7 +404,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$rules = [
|
||||
@ -484,7 +483,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$rules = array
|
||||
@ -537,7 +536,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
|
||||
$this->service->unPublishEvent($summit, $event_id);
|
||||
@ -694,7 +693,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -856,7 +855,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -887,7 +886,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$data = $data->all();
|
||||
$member_id = $this->resource_server_context->getCurrentUserExternalId();
|
||||
|
||||
if (is_null($member_id)) return $this->error403();
|
||||
if (is_null($member_id)) return $this->error400();
|
||||
|
||||
$data['member_id'] = intval($member_id);
|
||||
|
||||
@ -1016,7 +1015,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -1061,7 +1060,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
@ -1106,7 +1105,7 @@ final class OAuth2SummitEventsApiController extends OAuth2ProtectedController
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
|
||||
$data = Input::json();
|
||||
|
||||
|
@ -731,7 +731,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function addLocation($summit_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -775,7 +775,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addVenue($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -818,7 +818,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addExternalLocation($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -861,7 +861,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addHotel($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -904,7 +904,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addAirport($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -949,7 +949,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addVenueFloor($summit_id, $venue_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -996,7 +996,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addVenueRoom($summit_id, $venue_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -1040,7 +1040,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addVenueFloorRoom($summit_id, $venue_id, $floor_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -1091,7 +1091,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateLocation($summit_id, $location_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1137,7 +1137,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateVenue($summit_id, $venue_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1183,7 +1183,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateVenueFloor($summit_id, $venue_id, $floor_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -1231,7 +1231,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateVenueRoom($summit_id, $venue_id, $room_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -1277,7 +1277,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateVenueFloorRoom($summit_id, $venue_id, $floor_id, $room_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
@ -1326,7 +1326,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateHotel($summit_id, $hotel_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1372,7 +1372,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateAirport($summit_id, $airport_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1418,7 +1418,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateExternalLocation($summit_id, $external_location_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1666,7 +1666,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function addLocationBanner($summit_id, $location_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1759,7 +1759,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateLocationBanner($summit_id, $location_id, $banner_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$payload = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -1867,6 +1867,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
$file = $request->file('file');
|
||||
|
||||
if(is_null($file))
|
||||
throw new ValidationException('file is required.');
|
||||
|
||||
@ -1928,6 +1929,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
public function updateLocationMap(LaravelRequest $request, $summit_id, $location_id, $map_id){
|
||||
|
||||
try {
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
@ -1938,7 +1940,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
}
|
||||
|
||||
if(!strstr($content_type, 'multipart/form-data'))
|
||||
return $this->error403();
|
||||
return $this->error400();
|
||||
|
||||
$multiPartRequestParser = new ParseMultiPartFormDataInputStream();
|
||||
$input = $multiPartRequestParser->getInput();
|
||||
@ -2154,7 +2156,7 @@ final class OAuth2SummitLocationsApiController extends OAuth2ProtectedController
|
||||
}
|
||||
|
||||
if(!strstr($content_type, 'multipart/form-data'))
|
||||
return $this->error403();
|
||||
return $this->error400();
|
||||
|
||||
$multiPartRequestParser = new ParseMultiPartFormDataInputStream();
|
||||
$input = $multiPartRequestParser->getInput();
|
||||
|
@ -340,7 +340,7 @@ final class OAuth2SummitPromoCodesApiController extends OAuth2ProtectedControlle
|
||||
*/
|
||||
public function addPromoCodeBySummit($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -391,7 +391,7 @@ final class OAuth2SummitPromoCodesApiController extends OAuth2ProtectedControlle
|
||||
public function updatePromoCodeBySummit($summit_id, $promo_code_id)
|
||||
{
|
||||
try {
|
||||
if (!Request::isJson()) return $this->error403();
|
||||
if (!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
|
@ -13,6 +13,7 @@
|
||||
**/
|
||||
use App\Http\Utils\PagingConstants;
|
||||
use App\Models\Foundation\Summit\Repositories\IRSVPTemplateRepository;
|
||||
use App\Services\Model\IRSVPTemplateService;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
@ -26,7 +27,6 @@ use utils\Filter;
|
||||
use utils\FilterParser;
|
||||
use utils\OrderParser;
|
||||
use utils\PagingInfo;
|
||||
|
||||
/**
|
||||
* Class OAuth2SummitRSVPTemplatesApiController
|
||||
* @package App\Http\Controllers
|
||||
@ -44,21 +44,29 @@ final class OAuth2SummitRSVPTemplatesApiController extends OAuth2ProtectedContro
|
||||
*/
|
||||
private $rsvp_template_repository;
|
||||
|
||||
/**
|
||||
* @var IRSVPTemplateService
|
||||
*/
|
||||
private $rsvp_template_service;
|
||||
|
||||
/**
|
||||
* OAuth2SummitRSVPTemplatesApiController constructor.
|
||||
* @param ISummitRepository $summit_repository
|
||||
* @param IRSVPTemplateRepository $rsvp_template_repository
|
||||
* @param IRSVPTemplateService $rsvp_template_service
|
||||
* @param IResourceServerContext $resource_server_context
|
||||
*/
|
||||
public function __construct
|
||||
(
|
||||
ISummitRepository $summit_repository,
|
||||
IRSVPTemplateRepository $rsvp_template_repository,
|
||||
IRSVPTemplateService $rsvp_template_service,
|
||||
IResourceServerContext $resource_server_context
|
||||
)
|
||||
{
|
||||
parent::__construct($resource_server_context);
|
||||
$this->summit_repository = $summit_repository;
|
||||
$this->rsvp_template_service = $rsvp_template_service;
|
||||
$this->rsvp_template_repository = $rsvp_template_repository;
|
||||
}
|
||||
|
||||
@ -156,4 +164,72 @@ final class OAuth2SummitRSVPTemplatesApiController extends OAuth2ProtectedContro
|
||||
return $this->error500($ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $summit_id
|
||||
* @param $template_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRSVPTemplate($summit_id, $template_id){
|
||||
try {
|
||||
|
||||
$expand = Request::input('expand', '');
|
||||
$relations = Request::input('relations', '');
|
||||
$relations = !empty($relations) ? explode(',', $relations) : [];
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
$template = $summit->getRSVPTemplateById($template_id);
|
||||
|
||||
if (is_null($template)) {
|
||||
return $this->error404();
|
||||
}
|
||||
|
||||
return $this->ok(SerializerRegistry::getInstance()->getSerializer($template)->serialize($expand,[], $relations));
|
||||
}
|
||||
catch (ValidationException $ex1) {
|
||||
Log::warning($ex1);
|
||||
return $this->error412(array($ex1->getMessage()));
|
||||
}
|
||||
catch(EntityNotFoundException $ex2)
|
||||
{
|
||||
Log::warning($ex2);
|
||||
return $this->error404(array('message'=> $ex2->getMessage()));
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
Log::error($ex);
|
||||
return $this->error500($ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $summit_id
|
||||
* @param $template_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function deleteRSVPTemplate($summit_id, $template_id){
|
||||
try {
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
if (is_null($summit)) return $this->error404();
|
||||
|
||||
$this->rsvp_template_service->deleteTemplate($summit, $template_id);
|
||||
|
||||
return $this->deleted();
|
||||
}
|
||||
catch (ValidationException $ex1) {
|
||||
Log::warning($ex1);
|
||||
return $this->error412(array($ex1->getMessage()));
|
||||
}
|
||||
catch(EntityNotFoundException $ex2)
|
||||
{
|
||||
Log::warning($ex2);
|
||||
return $this->error404(array('message'=> $ex2->getMessage()));
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
Log::error($ex);
|
||||
return $this->error500($ex);
|
||||
}
|
||||
}
|
||||
}
|
@ -360,7 +360,7 @@ final class OAuth2SummitSpeakersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addSpeakerBySummit($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -426,7 +426,7 @@ final class OAuth2SummitSpeakersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateSpeakerBySummit($summit_id, $speaker_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -533,7 +533,7 @@ final class OAuth2SummitSpeakersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function merge($speaker_from_id, $speaker_to_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$speaker_from = $this->speaker_repository->getById($speaker_from_id);
|
||||
@ -566,7 +566,7 @@ final class OAuth2SummitSpeakersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addSpeaker(){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$rules = [
|
||||
@ -628,7 +628,7 @@ final class OAuth2SummitSpeakersApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateSpeaker($speaker_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
|
||||
|
@ -243,7 +243,7 @@ final class OAuth2SummitSpeakersAssistanceApiController extends OAuth2ProtectedC
|
||||
public function addSpeakerSummitAssistance($summit_id)
|
||||
{
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -295,7 +295,7 @@ final class OAuth2SummitSpeakersAssistanceApiController extends OAuth2ProtectedC
|
||||
public function updateSpeakerSummitAssistance($summit_id, $assistance_id)
|
||||
{
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json()->all();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
|
@ -289,7 +289,7 @@ final class OAuth2SummitTracksApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function addTrackBySummit($summit_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -345,7 +345,7 @@ final class OAuth2SummitTracksApiController extends OAuth2ProtectedController
|
||||
*/
|
||||
public function updateTrackBySummit($summit_id, $track_id){
|
||||
try {
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
|
@ -343,7 +343,7 @@ final class OAuth2SummitsEventTypesApiController extends OAuth2ProtectedControll
|
||||
public function addEventTypeBySummit($summit_id){
|
||||
try {
|
||||
|
||||
if(!Request::isJson()) return $this->error403();
|
||||
if(!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
@ -389,7 +389,7 @@ final class OAuth2SummitsEventTypesApiController extends OAuth2ProtectedControll
|
||||
public function updateEventTypeBySummit($summit_id, $event_type_id)
|
||||
{
|
||||
try {
|
||||
if (!Request::isJson()) return $this->error403();
|
||||
if (!Request::isJson()) return $this->error400();
|
||||
$data = Input::json();
|
||||
|
||||
$summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->resource_server_context)->find($summit_id);
|
||||
|
@ -167,6 +167,10 @@ Route::group([
|
||||
// rsvp templates
|
||||
Route::group(array('prefix' => 'rsvp-templates'), function () {
|
||||
Route::get('', [ 'middleware' => 'auth.user:administrators|summit-front-end-administrators', 'uses' => 'OAuth2SummitRSVPTemplatesApiController@getAllBySummit']);
|
||||
Route::group(array('prefix' => '{template_id}'), function () {
|
||||
Route::get('', [ 'middleware' => 'auth.user:administrators|summit-front-end-administrators', 'uses' => 'OAuth2SummitRSVPTemplatesApiController@getRSVPTemplate']);
|
||||
Route::delete('', [ 'middleware' => 'auth.user:administrators|summit-front-end-administrators', 'uses' => 'OAuth2SummitRSVPTemplatesApiController@deleteRSVPTemplate']);
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('', [ 'middleware' => 'cache:'.Config::get('cache_api_response.get_summit_response_lifetime', 1200), 'uses' => 'OAuth2SummitApiController@getSummit'])->where('id', 'current|[0-9]+');
|
||||
|
@ -29,7 +29,7 @@ class RSVPMultiValueQuestionTemplate extends RSVPQuestionTemplate
|
||||
private $empty_string;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="RSVPQuestionValueTemplate", mappedBy="owner", cascade={"persist"}, orphanRemoval=true)
|
||||
* @ORM\OneToMany(targetEntity="RSVPQuestionValueTemplate", mappedBy="owner", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @var RSVPQuestionValueTemplate[]
|
||||
*/
|
||||
private $values;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
use models\utils\SilverstripeBaseModel;
|
||||
use App\Models\Utils\BaseEntity;
|
||||
use Doctrine\ORM\Mapping AS ORM;
|
||||
/**
|
||||
* @ORM\Table(name="RSVPQuestionTemplate_DependsOn")
|
||||
@ -19,7 +19,7 @@ use Doctrine\ORM\Mapping AS ORM;
|
||||
* Class RSVPQuestionDependsOn
|
||||
* @package App\Models\Foundation\Summit\Events\RSVP
|
||||
*/
|
||||
class RSVPQuestionDependsOn extends SilverstripeBaseModel
|
||||
class RSVPQuestionDependsOn extends BaseEntity
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="RSVPQuestionTemplate", inversedBy="depends_on")
|
||||
|
@ -75,7 +75,7 @@ class RSVPQuestionTemplate extends SilverstripeBaseModel
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="RSVPQuestionDependsOn", mappedBy="parent", cascade={"persist"}, orphanRemoval=true)
|
||||
* @ORM\OneToMany(targetEntity="RSVPQuestionDependsOn", mappedBy="parent", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @var RSVPQuestionDependsOn[]
|
||||
*/
|
||||
protected $depends_on;
|
||||
|
@ -48,7 +48,7 @@ final class SummitLocationImageFactory
|
||||
$image->setName(trim($data['name']));
|
||||
|
||||
if(isset($data['description']))
|
||||
$image->setName(trim($data['description']));
|
||||
$image->setDescription(trim($data['description']));
|
||||
|
||||
return $image;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class SummitLocationImage extends SilverstripeBaseModel
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="Order", type="integer")
|
||||
* @ORM\Column(name="`Order`", type="integer")
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
@ -44,7 +44,7 @@ class SummitLocationImage extends SilverstripeBaseModel
|
||||
protected $class_name;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="models\main\File", fetch="EAGER")
|
||||
* @ORM\ManyToOne(targetEntity="models\main\File", fetch="EAGER", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="PictureID", referencedColumnName="ID", onDelete="CASCADE")
|
||||
* @var File
|
||||
*/
|
||||
|
@ -1688,6 +1688,16 @@ SQL;
|
||||
return $rsvp_template === false ? null : $rsvp_template;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RSVPTemplate $template
|
||||
* @return $this
|
||||
*/
|
||||
public function removeRSVPTemplate(RSVPTemplate $template){
|
||||
$this->rsvp_templates->removeElement($template);
|
||||
$template->clearSummit();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SummitAbstractLocation $location
|
||||
* @param int $new_order
|
||||
|
@ -50,4 +50,7 @@ trait SummitOwned
|
||||
}
|
||||
}
|
||||
|
||||
public function clearSummit(){
|
||||
$this->summit = null;
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ interface ILocationService
|
||||
/**
|
||||
* @param Summit $summit
|
||||
* @param int $location_id
|
||||
* @return SummitAbstractLocation
|
||||
* @return void
|
||||
* @throws EntityNotFoundException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
|
31
app/Services/Model/IRSVPTemplateService.php
Normal file
31
app/Services/Model/IRSVPTemplateService.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php namespace App\Services\Model;
|
||||
/**
|
||||
* Copyright 2018 OpenStack Foundation
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
use models\exceptions\EntityNotFoundException;
|
||||
use models\exceptions\ValidationException;
|
||||
use models\summit\Summit;
|
||||
/**
|
||||
* Interface IRSVPTemplateService
|
||||
* @package App\Services\Model
|
||||
*/
|
||||
interface IRSVPTemplateService
|
||||
{
|
||||
/**
|
||||
* @param Summit $summit
|
||||
* @param int $template_id
|
||||
* @return void
|
||||
* @throws EntityNotFoundException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function deleteTemplate(Summit $summit, $template_id);
|
||||
}
|
@ -1178,7 +1178,7 @@ final class LocationService implements ILocationService
|
||||
}
|
||||
|
||||
$uploader = new FileUploader($this->folder_service);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/maps/', $location->getSummitId(), $location->getId()), true);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/maps', $location->getSummitId(), $location->getId()), true);
|
||||
$map = SummitLocationImageFactory::buildMap($metadata);
|
||||
$map->setPicture($pic);
|
||||
$location->addMap($map);
|
||||
@ -1282,7 +1282,7 @@ final class LocationService implements ILocationService
|
||||
}
|
||||
|
||||
$uploader = new FileUploader($this->folder_service);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/maps/', $location->getSummitId(), $location->getId()), true);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/maps', $location->getSummitId(), $location->getId()), true);
|
||||
$map->setPicture($pic);
|
||||
}
|
||||
|
||||
@ -1449,7 +1449,7 @@ final class LocationService implements ILocationService
|
||||
}
|
||||
|
||||
$uploader = new FileUploader($this->folder_service);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/images/', $location->getSummitId(), $location->getId()), true);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/images', $location->getSummitId(), $location->getId()), true);
|
||||
$image = SummitLocationImageFactory::buildImage($metadata);
|
||||
$image->setPicture($pic);
|
||||
$location->addImage($image);
|
||||
@ -1553,7 +1553,7 @@ final class LocationService implements ILocationService
|
||||
}
|
||||
|
||||
$uploader = new FileUploader($this->folder_service);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/images/', $location->getSummitId(), $location->getId()), true);
|
||||
$pic = $uploader->build($file, sprintf('summits/%s/locations/%s/images', $location->getSummitId(), $location->getId()), true);
|
||||
$image->setPicture($pic);
|
||||
}
|
||||
|
||||
|
68
app/Services/Model/RSVPTemplateService.php
Normal file
68
app/Services/Model/RSVPTemplateService.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php namespace App\Services\Model;
|
||||
/**
|
||||
* Copyright 2018 OpenStack Foundation
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
use App\Models\Foundation\Summit\Repositories\IRSVPTemplateRepository;
|
||||
use libs\utils\ITransactionService;
|
||||
use models\exceptions\EntityNotFoundException;
|
||||
use models\exceptions\ValidationException;
|
||||
use models\summit\Summit;
|
||||
|
||||
/**
|
||||
* Class RSVPTemplateService
|
||||
* @package App\Services\Model
|
||||
*/
|
||||
final class RSVPTemplateService implements IRSVPTemplateService
|
||||
{
|
||||
/**
|
||||
* @var IRSVPTemplateRepository
|
||||
*/
|
||||
private $rsvp_template_repository;
|
||||
|
||||
/**
|
||||
* @var ITransactionService
|
||||
*/
|
||||
private $tx_service;
|
||||
|
||||
/**
|
||||
* RSVPTemplateService constructor.
|
||||
* @param IRSVPTemplateRepository $rsvp_template_repository
|
||||
* @param ITransactionService $tx_service
|
||||
*/
|
||||
public function __construct(IRSVPTemplateRepository $rsvp_template_repository, ITransactionService $tx_service)
|
||||
{
|
||||
$this->rsvp_template_repository = $rsvp_template_repository;
|
||||
$this->tx_service = $tx_service;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Summit $summit
|
||||
* @param int $template_id
|
||||
* @return void
|
||||
* @throws EntityNotFoundException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function deleteTemplate(Summit $summit, $template_id)
|
||||
{
|
||||
$this->tx_service->transaction(function() use($summit, $template_id){
|
||||
$template = $summit->getRSVPTemplateById($template_id);
|
||||
if(is_null($template))
|
||||
throw new EntityNotFoundException
|
||||
(
|
||||
trans()
|
||||
);
|
||||
|
||||
$summit->removeRSVPTemplate($template);
|
||||
});
|
||||
}
|
||||
}
|
@ -19,10 +19,12 @@ use App\Services\Model\IAttendeeService;
|
||||
use App\Services\Model\IFolderService;
|
||||
use App\Services\Model\ILocationService;
|
||||
use App\Services\Model\IMemberService;
|
||||
use App\Services\Model\IRSVPTemplateService;
|
||||
use App\Services\Model\ISummitEventTypeService;
|
||||
use App\Services\Model\ISummitTrackService;
|
||||
use App\Services\Model\LocationService;
|
||||
use App\Services\Model\MemberService;
|
||||
use App\Services\Model\RSVPTemplateService;
|
||||
use App\Services\Model\SummitPromoCodeService;
|
||||
use App\Services\Model\SummitTrackService;
|
||||
use App\Services\SummitEventTypeService;
|
||||
@ -181,6 +183,12 @@ final class ServicesProvider extends ServiceProvider
|
||||
FolderService::class
|
||||
);
|
||||
|
||||
App::singleton
|
||||
(
|
||||
IRSVPTemplateService::class,
|
||||
RSVPTemplateService::class
|
||||
);
|
||||
|
||||
App::singleton(IGeoCodingAPI::class, function(){
|
||||
return new GoogleGeoCodingAPI
|
||||
(
|
||||
|
@ -697,6 +697,23 @@ class ApiEndpointsSeeder extends Seeder
|
||||
sprintf(SummitScopes::ReadAllSummitData, $current_realm)
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'get-rsvp-template',
|
||||
'route' => '/api/v1/summits/{id}/rsvp-templates/{template_id}',
|
||||
'http_method' => 'GET',
|
||||
'scopes' => [
|
||||
sprintf(SummitScopes::ReadAllSummitData, $current_realm)
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'delete-rsvp-template',
|
||||
'route' => '/api/v1/summits/{id}/rsvp-templates/{template_id}',
|
||||
'http_method' => 'DELETE',
|
||||
'scopes' => [
|
||||
sprintf(SummitScopes::WriteSummitData, $current_realm),
|
||||
sprintf(SummitScopes::WriteLocationsData, $current_realm)
|
||||
],
|
||||
],
|
||||
// rooms
|
||||
[
|
||||
'name' => 'get-venue-room',
|
||||
|
@ -30,6 +30,6 @@ run following commands on root folder
|
||||
|
||||
Laravel may require some permissions to be configured: folders within storage and vendor require write access by the web server.
|
||||
|
||||
## check SS schema
|
||||
## create SS schema
|
||||
|
||||
php artisan doctrine:schema:create --sql --em=ss > ss.sql
|
@ -45,5 +45,72 @@ final class OAuth2SummitRSVPTemplateApiTest extends ProtectedApiTest
|
||||
|
||||
$rsvp_templates = json_decode($content);
|
||||
$this->assertTrue(!is_null($rsvp_templates));
|
||||
return $rsvp_templates;
|
||||
}
|
||||
|
||||
public function testGetRSVPTemplateById($summit_id = 23){
|
||||
|
||||
$templates = $this->testGetSummitRSVPTemplates($summit_id);
|
||||
|
||||
|
||||
$params = [
|
||||
'id' => $summit_id,
|
||||
'template_id' => $templates->data[0]->id,
|
||||
];
|
||||
|
||||
$headers =
|
||||
[
|
||||
"HTTP_Authorization" => " Bearer " . $this->access_token,
|
||||
"CONTENT_TYPE" => "application/json"
|
||||
];
|
||||
|
||||
$response = $this->action
|
||||
(
|
||||
"GET",
|
||||
"OAuth2SummitRSVPTemplatesApiController@getRSVPTemplate",
|
||||
$params,
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
$headers
|
||||
);
|
||||
|
||||
$content = $response->getContent();
|
||||
$this->assertResponseStatus(200);
|
||||
|
||||
$rsvp_template = json_decode($content);
|
||||
$this->assertTrue(!is_null($rsvp_template));
|
||||
return $rsvp_template;
|
||||
}
|
||||
|
||||
public function testDeleteRSVPTemplate($summit_id = 23){
|
||||
|
||||
$template = $this->testGetRSVPTemplateById($summit_id);
|
||||
|
||||
$params = [
|
||||
'id' => $summit_id,
|
||||
'template_id' => $template->id
|
||||
];
|
||||
|
||||
$headers =
|
||||
[
|
||||
"HTTP_Authorization" => " Bearer " . $this->access_token,
|
||||
"CONTENT_TYPE" => "application/json"
|
||||
];
|
||||
|
||||
$response = $this->action
|
||||
(
|
||||
"DELETE",
|
||||
"OAuth2SummitRSVPTemplatesApiController@deleteRSVPTemplate",
|
||||
$params,
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
$headers
|
||||
);
|
||||
|
||||
$content = $response->getContent();
|
||||
$this->assertResponseStatus(204);
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user