Skip to content

Commit 55a1c1c

Browse files
committed
style: Apply linter formatting
1 parent 187eb2f commit 55a1c1c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/Controller/AangebodenGebruikController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,13 @@ public function getGebruiksWhereDeelnemers(): JSONResponse
550550
$result = $this->gebruikSvc->getGebruiksWhereDeelnemers($options);
551551

552552
// Determine appropriate HTTP status code.
553-
$statusCode = 500;
553+
$statusCode = 500;
554554
if ($result['success'] === true) {
555+
$statusCode = 200;
556+
} else if (($result['error'] ?? '') === 'Gebruik object not found') {
557+
$statusCode = 404;
558+
} else if (strpos(haystack: ($result['error'] ?? ''), needle: 'Operation not allowed') !== false) {
559+
$statusCode = 403;
555560
}
556561

557562
$this->logger->info(

0 commit comments

Comments
 (0)