From bc54b8b35ecff466887aa03fd6d0bb60895335c6 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 8 Apr 2021 09:41:54 -0400 Subject: [PATCH] Set whitelist type when not string --- app/controllers/api/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 58ec3ee978..d22113d293 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -346,7 +346,7 @@ App::patch('/v1/users/:userId/status') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USER) ->param('userId', '', new UID(), 'User unique ID.') - ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) + ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true, 'integer'), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) ->inject('response') ->inject('projectDB') ->action(function ($userId, $status, $response, $projectDB) {