|
|
@@ -39,6 +39,7 @@ class Optimize_Options_Action extends Action{
|
|
|
$player = filter_input(INPUT_POST, 'player');
|
|
|
if ($player == null){
|
|
|
$this->code = 400;
|
|
|
+ error_log("400 player");
|
|
|
$this->message = "POST parameter 'player' not specified or invalid.";
|
|
|
return;
|
|
|
}
|
|
|
@@ -46,6 +47,7 @@ class Optimize_Options_Action extends Action{
|
|
|
$unit_id = filter_input(INPUT_POST, 'unit');
|
|
|
if ($unit_id == null){
|
|
|
$this->code = 400;
|
|
|
+ error_log("400 unit");
|
|
|
$this->message = "POST parameter 'unit' not specified or invalid.";
|
|
|
return;
|
|
|
}
|
|
|
@@ -58,16 +60,20 @@ class Optimize_Options_Action extends Action{
|
|
|
$tuning = filter_input(INPUT_POST, 'tuning');
|
|
|
if ($tuning == null){
|
|
|
$this->code = 400;
|
|
|
+ error_log("400 tining");
|
|
|
$this->message = "POST parameter 'tuning' not specified or invalid.";
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $options = json_decode(filter_input(INPUT_POST, 'options'), true);
|
|
|
- if ($options == null){
|
|
|
+ if (filter_input(INPUT_POST, 'options') == null){
|
|
|
$this->code = 400;
|
|
|
+ error_log("400 option");
|
|
|
$this->message = "POST parameter 'options' not specified or invalid.";
|
|
|
return;
|
|
|
}
|
|
|
+ $options = json_decode(filter_input(INPUT_POST, 'options'), true);
|
|
|
+ if ($options == null){
|
|
|
+ }
|
|
|
foreach ($options as $option){
|
|
|
$set = [
|
|
|
"runes" => [],
|