fix: api
This commit is contained in:
parent
deb4b16ae1
commit
3ae990aa40
@ -683,6 +683,9 @@ private function create_application(Request $request, $type)
|
|||||||
if (! $request->has('name')) {
|
if (! $request->has('name')) {
|
||||||
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
||||||
}
|
}
|
||||||
|
if ($request->build_pack === 'dockercompose') {
|
||||||
|
$request->offsetSet('ports_exposes', '80');
|
||||||
|
}
|
||||||
$validator = customApiValidator($request->all(), [
|
$validator = customApiValidator($request->all(), [
|
||||||
sharedDataApplications(),
|
sharedDataApplications(),
|
||||||
'git_repository' => 'string|required',
|
'git_repository' => 'string|required',
|
||||||
@ -756,6 +759,9 @@ private function create_application(Request $request, $type)
|
|||||||
if (! $request->has('name')) {
|
if (! $request->has('name')) {
|
||||||
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
||||||
}
|
}
|
||||||
|
if ($request->build_pack === 'dockercompose') {
|
||||||
|
$request->offsetSet('ports_exposes', '80');
|
||||||
|
}
|
||||||
$validator = customApiValidator($request->all(), [
|
$validator = customApiValidator($request->all(), [
|
||||||
sharedDataApplications(),
|
sharedDataApplications(),
|
||||||
'git_repository' => 'string|required',
|
'git_repository' => 'string|required',
|
||||||
@ -847,6 +853,9 @@ private function create_application(Request $request, $type)
|
|||||||
if (! $request->has('name')) {
|
if (! $request->has('name')) {
|
||||||
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
$request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch));
|
||||||
}
|
}
|
||||||
|
if ($request->build_pack === 'dockercompose') {
|
||||||
|
$request->offsetSet('ports_exposes', '80');
|
||||||
|
}
|
||||||
$validator = customApiValidator($request->all(), [
|
$validator = customApiValidator($request->all(), [
|
||||||
sharedDataApplications(),
|
sharedDataApplications(),
|
||||||
'git_repository' => 'string|required',
|
'git_repository' => 'string|required',
|
||||||
@ -1268,11 +1277,8 @@ public function delete_by_uuid(Request $request)
|
|||||||
if (is_null($teamId)) {
|
if (is_null($teamId)) {
|
||||||
return invalidTokenResponse();
|
return invalidTokenResponse();
|
||||||
}
|
}
|
||||||
|
if (! $request->uuid) {
|
||||||
if ($request->collect()->count() == 0) {
|
return response()->json(['message' => 'UUID is required.'], 404);
|
||||||
return response()->json([
|
|
||||||
'message' => 'Invalid request.',
|
|
||||||
], 400);
|
|
||||||
}
|
}
|
||||||
$application = Application::ownedByCurrentTeamAPI($teamId)->where('uuid', $request->uuid)->first();
|
$application = Application::ownedByCurrentTeamAPI($teamId)->where('uuid', $request->uuid)->first();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user