fix: parse arguments to CardService.reorder correctly to int
Signed-off-by: Viktor Diezel <viktor.diezel@posteo.de>
This commit is contained in:
committed by
backportbot[bot]
parent
b19872e56c
commit
7b7221b3e1
@@ -185,7 +185,7 @@ class CardApiController extends ApiController {
|
|||||||
* Reorder cards
|
* Reorder cards
|
||||||
*/
|
*/
|
||||||
public function reorder($stackId, $order) {
|
public function reorder($stackId, $order) {
|
||||||
$card = $this->cardService->reorder($this->request->getParam('cardId'), $stackId, $order);
|
$card = $this->cardService->reorder((int)$this->request->getParam('cardId'), (int)$stackId, (int)$order);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ class CardService {
|
|||||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||||
* @throws BadRequestException
|
* @throws BadRequestException
|
||||||
*/
|
*/
|
||||||
public function reorder($id, $stackId, $order) {
|
public function reorder(int $id, int $stackId, int $order) {
|
||||||
$this->cardServiceValidator->check(compact('id', 'stackId', 'order'));
|
$this->cardServiceValidator->check(compact('id', 'stackId', 'order'));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user