Skip to content

Commit

Permalink
refactor references to Diocese, to Nation references
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Feb 9, 2022
1 parent 4ca8af7 commit 1247b98
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions LitCalNationalAndRegionalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"https://litcal-staging.johnromanodorazio.com"
];

$LitCalDiocesanData = new LitCalNationalData();
$LitCalNationalData = new LitCalNationalData();

$LitCalDiocesanData->APICore->setAllowedOrigins( $allowedOrigins );
$LitCalDiocesanData->APICore->setAllowedReferers( array_map( function($el){ return $el . "/"; }, $allowedOrigins ) );
$LitCalNationalData->APICore->setAllowedOrigins( $allowedOrigins );
$LitCalNationalData->APICore->setAllowedReferers( array_map( function($el){ return $el . "/"; }, $allowedOrigins ) );

$LitCalDiocesanData->APICore->setAllowedAcceptHeaders( [ AcceptHeader::JSON ] );
$LitCalDiocesanData->APICore->setAllowedRequestContentTypes( [ RequestContentType::JSON, RequestContentType::FORMDATA ] );
$LitCalDiocesanData->Init();
$LitCalNationalData->APICore->setAllowedAcceptHeaders( [ AcceptHeader::JSON ] );
$LitCalNationalData->APICore->setAllowedRequestContentTypes( [ RequestContentType::JSON, RequestContentType::FORMDATA ] );
$LitCalNationalData->Init();

class LitCalNationalData {

Expand Down Expand Up @@ -151,7 +151,7 @@ private function writeNationalCalendar() {

//$this->createOrUpdateIndex( $path );
header( $_SERVER[ "SERVER_PROTOCOL" ]." 201 Created", true, 201 );
die( '{"success":"Diocesan calendar created or updated for diocese \"'. $this->RESPONSE->Diocese .'\""}' );
die( '{"success":"National calendar created or updated for nation \"'. $this->RESPONSE->Diocese .'\""}' );

}
}
Expand All @@ -170,7 +170,7 @@ private function deleteNationalCalendar() {

//$this->createOrUpdateIndex( $path, true );
header( $_SERVER[ "SERVER_PROTOCOL" ]." 200 OK", true, 200 );
die( '{"success":"Diocesan calendar deleted for diocese \"'. $this->RESPONSE->Diocese .'\""}' );
die( '{"success":"National calendar deleted for nation \"'. $this->RESPONSE->Diocese .'\""}' );

}
}
Expand Down

0 comments on commit 1247b98

Please sign in to comment.