Skip to content
Snippets Groups Projects
Commit beab4c60 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #13858 TIME 0:10 improve control on priority + doc

parent 286683b2
No related branches found
No related tags found
No related merge requests found
...@@ -471,6 +471,10 @@ class ResourceControlController ...@@ -471,6 +471,10 @@ class ResourceControlController
} }
} }
} elseif (!empty($body['priority'])) { } elseif (!empty($body['priority'])) {
if (!Validator::stringType()->validate($body['priority'])) {
return ['errors' => "Body priority is not a string"];
}
$priority = PriorityModel::getById(['id' => $body['priority'], 'select' => [1]]); $priority = PriorityModel::getById(['id' => $body['priority'], 'select' => [1]]);
if (empty($priority)) { if (empty($priority)) {
return ['errors' => "Body priority does not exist"]; return ['errors' => "Body priority does not exist"];
......
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