← All changes
|
backend/src/Controllers/Notification/GetNotificationsController.php
+0
-7
0.7
→
1.5.1
View file →
| @@ -1,13 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace IvyForms\Controllers\Notification; |
| 4 | 4 | |
| 5 | -// phpcs:disable PSR1.Files.SideEffects | |
| 6 | -if (!defined('ABSPATH')) { | |
| 7 | - exit; // Exit if accessed directly | |
| 8 | -} | |
| 9 | - | |
| 10 | 5 | use IvyForms\Common\Exceptions\ForbiddenException; |
| 11 | 6 | use IvyForms\Common\Exceptions\InvalidArgumentException; |
| 12 | 7 | use IvyForms\Common\Exceptions\NotFoundException; |
| 13 | 8 | use IvyForms\Common\Sanitizer\Sanitizer; |
| @@ -42,10 +37,8 @@ | ||
| 42 | 37 | { |
| 43 | 38 | // Verify the nonce |
| 44 | 39 | Sanitizer::verifyNonce($data->get_header('X-WP-Nonce')); |
| 45 | 40 | $formId = Sanitizer::sanitizeId($data->get_param('id')); |
| 46 | - | |
| 47 | - | |
| 48 | 41 | // TODO: Update this logic to only require the form ID after templates. |
| 49 | 42 | $notificationsArr = $formId |
| 50 | 43 | ? $this->notificationService->getNotificationsByFormId((int) $formId) |
| 51 | 44 | : $this->notificationService->getAllNotifications(); |