Unverified Commit 74ffe33c authored by everykittysdaydream's avatar everykittysdaydream Committed by GitHub
Browse files

Remove root endpoint (#25)

* return hal+json haha

* root endpoint on add job finish
parent 8981282f
......@@ -209,6 +209,7 @@ class CRM_Osdi_Page_Webhook extends CRM_Core_Page {
var_dump("dupe");
}
}
header('Content-Type:application/hal+json', TRUE, 200);
print json_encode(convertContactOSDI($result["values"][0], array()), JSON_PRETTY_PRINT);
}
}
......
......@@ -193,7 +193,7 @@ function civicrm_api3_o_s_d_i_job_Add($params) {
$returnValues["error_message"] = "this name is not unique.";
return civicrm_api3_create_success($returnValues, $params, 'OSDIJob', 'Add');
} else {
// we have to DELETE the onetime job, so exportonceparams can live
// we have to DELETE the onetime job, so exportonceparams can live (if one exists)
$results_onetime = civicrm_api3('Job', 'get', [
'name' => "OSDISYNC_EXPORT_ONETIME_" . $params["name"],
'sequential' => 1
......
......@@ -205,14 +205,12 @@
if ("values" in result) {
if ("error_message" in result["values"]) CRM.alert(result["values"]["error_message"]);
}
if (!edit) {
// redirect to mapping
window.location.href = "/civicrm/osdi/mapping?change=1&endpoint=" + rootendpoint.val();
}
});
if (!edit) {
// redirect to mapping
window.location.href = "/civicrm/osdi/mapping?change=1&endpoint=" + rootendpoint.val();
}
dialog.dialog( "close" );
}
......
Supports Markdown
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