blob: fb5d3c3408af24d66c71bba708017584b8d3688d [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once(__DIR__."/../core.php");
3security::checkType(security::ADMIN, security::METHOD_NOTFOUND);
4
5if (!security::checkParams("POST", [
6 ["person", security::PARAM_NEMPTY],
7 ["company", security::PARAM_NEMPTY]
8])) {
9 api::error();
10}
11
12$person = (int)$_POST["person"];
13$company = (int)$_POST["company"];
14
15if (people::addToCompany($person, $company)) {
16 echo "OK\n";
17} else {
18 api::error();
19}