blob: 3f5084c22eaba44958d5a333242594d3b9db43d9 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::WORKER);
4
5if (!security::checkParams("POST", [
6 ["incidents", security::PARAM_ISSET],
7 ["records", security::PARAM_ISSET],
8 ["method", security::PARAM_ISINT]
9])) {
10 security::go("validations.php?msg=unexpected");
11}
12
13$method = (int)$_POST["method"];
14
15$status = validations::validate($method, $_POST["incidents"], $_POST["records"]);
16switch ($status) {
17 case 0:
18 security::go("validations.php?msg=success");
19 break;
20
21 case 1:
22 security::go("validations.php?msg=partialsuccess");
23 break;
24
25 default:
26 security::go("validations.php?msg=unexpected");
27}