Restrict array list

This commit is contained in:
fogelito
2025-08-24 18:08:12 +03:00
parent ba79dda788
commit 959db2ea02
3 changed files with 26 additions and 43 deletions
@@ -97,12 +97,9 @@ class Upsert extends Action
throw new Exception($this->getMissingPayloadException());
}
// if (!empty($data) && \array_is_list($data)) {
// throw new Exception('shmuel');
// }
var_dump(array_is_list($data));
var_dump($data);
if (\array_is_list($data) && \count($data) > 1) { // Allow 1 associated array
throw new Exception($this->getMissingPayloadException());
}
$isAPIKey = Auth::isAppUser(Authorization::getRoles());
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles());