Skip to content

Commit

Permalink
fix: possibilité de supprimer user_agent et referer #614
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrousseau1 committed Jan 21, 2025
1 parent 9606ce7 commit a1ad07f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Entrepot/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function updateKey(string $keyId, #[MapRequestPayload] UserKeyDTO $dto):

try {
$body = array_filter((array) $dto, function ($value, $key) use ($filter) {
return !(null === $value || '' === $value || in_array($key, $filter));
return !(null === $value || ('' === $value && !in_array($key, ['user_agent', 'referer'])) || in_array($key, $filter));
}, ARRAY_FILTER_USE_BOTH);

$key = $this->userApiService->getMyKey($keyId);
Expand Down

0 comments on commit a1ad07f

Please sign in to comment.