Commit 79ff389d authored by okhin's avatar okhin 🚴

Adding the get_organization part

parent 48498245
......@@ -65,6 +65,12 @@ class Api {
return json_decode($json, true);
}
// Asking for organization details
statc function get_organization() {
$json = Api::get("campaigns/" . CAMPAIGN_ID . "/organization");
return json_decode($json, true);
}
// Posting a feedback
static function post_feedback($contact_id, $comment, $feedback_category='') {
$data = array(
......
......@@ -20,6 +20,8 @@ class Controller {
// Init campaign informations
$f3->set('campaign', Api::get_campaign());
// Get organization informations
$f3->set('organization', Api::get_organization());
// Init contacts list if needed
if (!$f3->exists('contacts')) {
$f3->set('contacts', Api::get_contacts(), API_TIMEOUT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment