Skip to content
Snippets Groups Projects
Verified Commit aa668411 authored by Damien's avatar Damien
Browse files

FEAT #5 Manage baskets order

parent 37a32461
No related branches found
No related tags found
No related merge requests found
...@@ -154,8 +154,8 @@ class BasketController ...@@ -154,8 +154,8 @@ class BasketController
$allowedMethods = ['UP', 'DOWN']; $allowedMethods = ['UP', 'DOWN'];
$allowedPowers = ['ONE', 'ALL']; $allowedPowers = ['ONE', 'ALL'];
$check = Validator::stringType()::notEmpty()->validate($data['method']) && in_array($data['method'], $allowedMethods); $check = Validator::stringType()->notEmpty()->validate($data['method']) && in_array($data['method'], $allowedMethods);
$check = $check && Validator::stringType()::notEmpty()->validate($data['power']) && in_array($data['power'], $allowedPowers); $check = $check && Validator::stringType()->notEmpty()->validate($data['power']) && in_array($data['power'], $allowedPowers);
if (!$check) { if (!$check) {
return $response->withStatus(400)->withJson(['errors' => 'Bad Request']); return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment