blob: fb5d3c3408af24d66c71bba708017584b8d3688d [file] [log] [blame]
<?php
require_once(__DIR__."/../core.php");
security::checkType(security::ADMIN, security::METHOD_NOTFOUND);
if (!security::checkParams("POST", [
["person", security::PARAM_NEMPTY],
["company", security::PARAM_NEMPTY]
])) {
api::error();
}
$person = (int)$_POST["person"];
$company = (int)$_POST["company"];
if (people::addToCompany($person, $company)) {
echo "OK\n";
} else {
api::error();
}