Skip to content

Commit 93df54d

Browse files
fix: HTTP codes now uses Response::HTTP_* constants
1 parent 2b2037e commit 93df54d

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitPresentationActionApiController.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
**/
1414
use App\Security\SummitScopes;
1515
use App\Services\Model\ISummitPresentationActionService;
16+
use Illuminate\Http\Response;
1617
use Illuminate\Support\Facades\Log;
1718
use Illuminate\Support\Facades\Request;
1819
use models\exceptions\EntityNotFoundException;
@@ -109,12 +110,11 @@ public function __construct
109110
description: 'Presentation action marked as completed successfully',
110111
content: new OA\JsonContent(ref: '#/components/schemas/PresentationAction')
111112
),
112-
new OA\Response(response: 400, ref: '#/components/responses/400'),
113-
new OA\Response(response: 401, ref: '#/components/responses/401'),
114-
new OA\Response(response: 403, ref: '#/components/responses/403', description: 'Forbidden - User must be a track chair or track chair admin'),
115-
new OA\Response(response: 404, ref: '#/components/responses/404'),
116-
new OA\Response(response: 412, ref: '#/components/responses/412'),
117-
new OA\Response(response: 500, ref: '#/components/responses/500'),
113+
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"),
114+
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden - User must be a track chair or track chair admin"),
115+
new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"),
116+
new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"),
117+
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
118118
]
119119
)]
120120

@@ -204,12 +204,11 @@ public function complete($summit_id, $selection_plan_id, $presentation_id, $acti
204204
description: 'Presentation action marked as incomplete successfully',
205205
content: new OA\JsonContent(ref: '#/components/schemas/PresentationAction')
206206
),
207-
new OA\Response(response: 400, ref: '#/components/responses/400'),
208-
new OA\Response(response: 401, ref: '#/components/responses/401'),
209-
new OA\Response(response: 403, ref: '#/components/responses/403', description: 'Forbidden - User must be a track chair or track chair admin'),
210-
new OA\Response(response: 404, ref: '#/components/responses/404'),
211-
new OA\Response(response: 412, ref: '#/components/responses/412'),
212-
new OA\Response(response: 500, ref: '#/components/responses/500'),
207+
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"),
208+
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden - User must be a track chair or track chair admin"),
209+
new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"),
210+
new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"),
211+
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
213212
]
214213
)]
215214

0 commit comments

Comments
 (0)