fix(DeployController): update request handling to use input method and enhance OpenAPI description for deployment endpoint
This commit is contained in:
		| @@ -133,7 +133,7 @@ class DeployController extends Controller | |||||||
| 
 | 
 | ||||||
|     #[OA\Get(
 |     #[OA\Get(
 | ||||||
|         summary: 'Deploy', |         summary: 'Deploy', | ||||||
|         description: 'Deploy by tag or uuid. `Post` request also accepted.', |         description: 'Deploy by tag or uuid. `Post` request also accepted with `uuid` and `tag` json body.', | ||||||
|         path: '/deploy', |         path: '/deploy', | ||||||
|         operationId: 'deploy-by-tag-or-uuid', |         operationId: 'deploy-by-tag-or-uuid', | ||||||
|         security: [ |         security: [ | ||||||
| @@ -192,10 +192,10 @@ class DeployController extends Controller | |||||||
|             return invalidTokenResponse(); |             return invalidTokenResponse(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $uuids = $request->query->get('uuid'); |         $uuids = $request->input('uuid'); | ||||||
|         $tags = $request->query->get('tag'); |         $tags = $request->input('tag'); | ||||||
|         $force = $request->query->get('force') ?? false; |         $force = $request->input('force') ?? false; | ||||||
|         $pr = $request->query->get('pr') ? max((int) $request->query->get('pr'), 0) : 0; |         $pr = $request->input('pr') ? max((int) $request->input('pr'), 0) : 0; | ||||||
| 
 | 
 | ||||||
|         if ($uuids && $tags) { |         if ($uuids && $tags) { | ||||||
|             return response()->json(['message' => 'You can only use uuid or tag, not both.'], 400); |             return response()->json(['message' => 'You can only use uuid or tag, not both.'], 400); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai