From e5ed1c7f6af9510f0be36dbab5494091a513b68c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 31 Jan 2017 20:04:34 -0500 Subject: [PATCH] =?UTF-8?q?One=20day=20eslint=20will=20have=20a=20PHP=20co?= =?UTF-8?q?unterpart=20that=20works=20in=20Atom...=20=F0=9F=A4=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Daemon/PackController.php | 17 ++++++++--------- app/Repositories/ServerRepository.php | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Daemon/PackController.php b/app/Http/Controllers/Daemon/PackController.php index 245b88627..e96aa6ee5 100644 --- a/app/Http/Controllers/Daemon/PackController.php +++ b/app/Http/Controllers/Daemon/PackController.php @@ -40,7 +40,7 @@ class PackController extends Controller } /** - * Pulls an install pack archive from the system + * Pulls an install pack archive from the system. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response @@ -49,12 +49,12 @@ class PackController extends Controller { $pack = Models\ServicePack::where('uuid', $uuid)->first(); - if (!$pack) { - return response()->json([ 'error' => 'No such pack.' ], 404); + if (! $pack) { + return response()->json(['error' => 'No such pack.'], 404); } if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { - return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + return response()->json(['error' => 'There is no archive available for this pack.'], 503); } return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')); @@ -70,12 +70,12 @@ class PackController extends Controller { $pack = Models\ServicePack::where('uuid', $uuid)->first(); - if (!$pack) { - return response()->json([ 'error' => 'No such pack.' ], 404); + if (! $pack) { + return response()->json(['error' => 'No such pack.'], 404); } if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { - return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + return response()->json(['error' => 'There is no archive available for this pack.'], 503); } return response()->json([ @@ -84,13 +84,12 @@ class PackController extends Controller } /** - * Pulls an update pack archive from the system + * Pulls an update pack archive from the system. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function pullUpdate(Request $request) { - } } diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 324e1f47d..beb5d94a6 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -786,6 +786,7 @@ class ServerRepository } $server->delete(); + return DB::commit(); } catch (\Exception $ex) { DB::rollBack();