diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminAuditItemsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminAuditItemsController.php index d51a8f5e..2d808824 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminAuditItemsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminAuditItemsController.php @@ -118,7 +118,9 @@ public function index(): JsonResponse /** * POST / + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function store(): JsonResponse @@ -193,7 +195,9 @@ public function show(int $id) * PUT /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) @@ -208,7 +212,9 @@ public function update(string $id) * DELETE / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function destroy(string $id) diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminFileUploadsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminFileUploadsController.php index 50511700..89e53b58 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminFileUploadsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminFileUploadsController.php @@ -37,6 +37,7 @@ class ApiAdminFileUploadsController extends Controller /** * GET / + * * @hideFromAPIDocumentation */ public function index(): JsonResponse @@ -185,8 +186,11 @@ public function store(): JsonResponse /** * GET /{id} + * * @hideFromAPIDocumentation + * * @param int $id + * * @return JsonResponse */ public function show(int $id): JsonResponse @@ -199,8 +203,11 @@ public function show(int $id): JsonResponse /** * PUT /{id} + * * @hideFromAPIDocumentation + * * @param int $id + * * @return JsonResponse */ public function update(int $id): JsonResponse @@ -213,8 +220,11 @@ public function update(int $id): JsonResponse /** * DELETE /{id} + * * @hideFromAPIDocumentation + * * @param int $id + * * @return JsonResponse */ public function destroy(int $id): JsonResponse diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminSearchController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminSearchController.php index f7ff7484..56ac6d8b 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminSearchController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminSearchController.php @@ -74,7 +74,9 @@ public function index(): JsonResponse /** * POST / + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function store(): JsonResponse @@ -89,7 +91,9 @@ public function store(): JsonResponse * GET /{id} * * @param int $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function show(int $id) @@ -104,7 +108,9 @@ public function show(int $id) * PUT /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) @@ -119,7 +125,9 @@ public function update(string $id) * DELETE / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function destroy(string $id) diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminSystemStatisticsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminSystemStatisticsController.php index 2fc6c140..d7faafc3 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminSystemStatisticsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminSystemStatisticsController.php @@ -16,7 +16,6 @@ use Knuckles\Scribe\Attributes\QueryParam; use Knuckles\Scribe\Attributes\Response; use Knuckles\Scribe\Attributes\Subgroup; -use Knuckles\Scribe\Attributes\UrlParam; #[Group('Admin Endpoints')] #[Subgroup('/admin/system-statistics', 'Search for system objects as an admin.')] @@ -117,7 +116,9 @@ public function index(): JsonResponse /** * POST / + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function store(): JsonResponse @@ -186,7 +187,9 @@ public function show(int $id) * PUT /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) @@ -201,7 +204,9 @@ public function update(string $id) * DELETE / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function destroy(string $id) diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamMerchantTeamsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamMerchantTeamsController.php index 8eab4db4..ba631be3 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamMerchantTeamsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamMerchantTeamsController.php @@ -237,7 +237,9 @@ public function store(): JsonResponse * GET /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function show(string $id) @@ -252,7 +254,9 @@ public function show(string $id) * PUT /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamServiceTeamsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamServiceTeamsController.php index 60b86149..b623132f 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamServiceTeamsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamServiceTeamsController.php @@ -212,7 +212,9 @@ public function store(): JsonResponse * GET / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function show(string $id) diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamUsersController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamUsersController.php index e8a35f82..f30c1b1c 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamUsersController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamUsersController.php @@ -218,7 +218,9 @@ public function store(): JsonResponse /** * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse * GET / {id} */ diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamVoucherTemplatesController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamVoucherTemplatesController.php index 75a1b67e..ccf7ad1f 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamVoucherTemplatesController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamVoucherTemplatesController.php @@ -222,7 +222,6 @@ public function index(): JsonResponse description: 'The path to the font being used in the template', required : true )] - public function store(): JsonResponse { $validationArray = [ diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamsController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamsController.php index 3a8829c9..eebac9df 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamsController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminTeamsController.php @@ -20,7 +20,6 @@ use Knuckles\Scribe\Attributes\QueryParam; use Knuckles\Scribe\Attributes\Response; use Knuckles\Scribe\Attributes\Subgroup; -use Knuckles\Scribe\Attributes\UrlParam; #[Group('Admin Endpoints')] #[Subgroup('/admin/teams', 'API for managing teams')] diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminUserPersonalAccessTokensController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminUserPersonalAccessTokensController.php index dd4c631e..0b09dc77 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminUserPersonalAccessTokensController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminUserPersonalAccessTokensController.php @@ -162,15 +162,15 @@ public function store(): JsonResponse * The validation array. */ $validationArray = [ - 'user_id' => [ + 'user_id' => [ 'required', Rule::exists('users', 'id'), ], - 'name' => [ + 'name' => [ 'required', 'string', ], - 'token_abilities' => [ + 'token_abilities' => [ 'required', 'array', ], @@ -179,7 +179,7 @@ public function store(): JsonResponse ], ]; - $messages = [ + $messages = [ 'token_abilities' => 'Please ensure the token has at least 1 ability associated to it.', ]; $validator = Validator::make($this->request->all(), $validationArray, $messages); @@ -188,9 +188,10 @@ public function store(): JsonResponse $this->responseCode = 400; $this->message = $validator->errors() - ->first(); + ->first(); - } else { + } + else { try { @@ -210,7 +211,8 @@ public function store(): JsonResponse event(new PersonalAccessTokenWasCreated($token->accessToken)); - } catch (Exception $e) { + } + catch (Exception $e) { $this->responseCode = 500; $this->message = ApiResponse::RESPONSE_ERROR->value . ': "' . $e->getMessage() . '".'; @@ -280,7 +282,9 @@ public function show(string $id) * PUT/ {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) @@ -314,14 +318,16 @@ public function destroy(string $id) $this->responseCode = 404; $this->message = ApiResponse::RESPONSE_NOT_FOUND->value; - } else { + } + else { $model->delete(); $this->message = ApiResponse::RESPONSE_DELETED->value; } - } catch (Exception $e) { + } + catch (Exception $e) { $this->responseCode = 500; $this->message = ApiResponse::RESPONSE_ERROR->value . ':' . $e->getMessage(); diff --git a/app/Http/Controllers/Api/V1/Admin/ApiAdminUsersController.php b/app/Http/Controllers/Api/V1/Admin/ApiAdminUsersController.php index 0c7700a5..0b8feb44 100644 --- a/app/Http/Controllers/Api/V1/Admin/ApiAdminUsersController.php +++ b/app/Http/Controllers/Api/V1/Admin/ApiAdminUsersController.php @@ -365,7 +365,9 @@ public function update(string $id) * DELETE / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function destroy(string $id) diff --git a/app/Http/Controllers/Api/V1/ApiMyTeamSearchController.php b/app/Http/Controllers/Api/V1/ApiMyTeamSearchController.php index 1abfc557..93277938 100644 --- a/app/Http/Controllers/Api/V1/ApiMyTeamSearchController.php +++ b/app/Http/Controllers/Api/V1/ApiMyTeamSearchController.php @@ -86,10 +86,11 @@ public function index(): JsonResponse return $this->respond(); } - /** * POST / + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function store(): JsonResponse @@ -104,7 +105,9 @@ public function store(): JsonResponse * GET /{id} * * @param int $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function show(int $id) @@ -119,7 +122,9 @@ public function show(int $id) * PUT /{id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function update(string $id) @@ -134,7 +139,9 @@ public function update(string $id) * DELETE / {id} * * @param string $id + * * @hideFromAPIDocumentation + * * @return JsonResponse */ public function destroy(string $id) diff --git a/routes/api.php b/routes/api.php index 7560c120..2724b295 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,6 +2,7 @@ use App\Enums\PersonalAccessTokenAbility; use App\Http\Controllers\Api\V1\Admin\ApiAdminAuditItemsController; +use App\Http\Controllers\Api\V1\Admin\ApiAdminFileUploadsController; use App\Http\Controllers\Api\V1\Admin\ApiAdminSearchController; use App\Http\Controllers\Api\V1\Admin\ApiAdminSystemStatisticsController; use App\Http\Controllers\Api\V1\Admin\ApiAdminTeamMerchantTeamsController; @@ -14,7 +15,6 @@ use App\Http\Controllers\Api\V1\Admin\ApiAdminVoucherRedemptionsController; use App\Http\Controllers\Api\V1\Admin\ApiAdminVouchersController; use App\Http\Controllers\Api\V1\Admin\ApiAdminVoucherSetsController; -use App\Http\Controllers\Api\V1\Admin\ApiAdminFileUploadsController; use App\Http\Controllers\Api\V1\ApiCountriesController; use App\Http\Controllers\Api\V1\ApiMyTeamAuditItemsController; use App\Http\Controllers\Api\V1\ApiMyTeamController;