fix: GET은 int를 arg로 받을 수 없음

This commit is contained in:
2022-05-15 17:00:14 +09:00
parent 459c108b13
commit 8104852abf
3 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -18,11 +18,12 @@ class GetBettingDetail extends \sammo\BaseAPI
$v->rule('required', [
'betting_id',
])
->rule('int', 'betting_id');
->rule('integer', 'betting_id');
if (!$v->validate()) {
return $v->errorStr();
}
$this->args['betting_id'] = (int)$this->args['betting_id'];
return null;
}
+4 -2
View File
@@ -25,14 +25,16 @@ class GetHistory extends \sammo\BaseAPI
$v = new Validator($this->args);
$v->rule('required', ['year', 'month'])
->rule('lengthMin', 'serverID', 1)
->rule('int', 'year')
->rule('int', 'month');
->rule('integer', 'year')
->rule('integer', 'month');
if (!$v->validate()) {
return $v->errorStr();
}
if (!$this->args['serverID']) {
$this->args['serverID'] = UniqueConst::$serverID;
}
$this->args['year'] = (int)$this->args['year'];
$this->args['month'] = (int)$this->args['month'];
return null;
}
+1 -1
View File
@@ -30,7 +30,7 @@ class GetGeneralLog extends \sammo\BaseAPI
'generalID',
'type',
])
->rule('int', [
->rule('integer', [
'generalID',
'reqTo',
])