Merge branch 'develop' into feature/service-changes
This commit is contained in:
commit
fc38b09e1f
169 changed files with 2268 additions and 2289 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -21,22 +21,19 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Repositories\ServiceRepository;
|
||||
|
||||
use DB;
|
||||
use Validator;
|
||||
use Uuid;
|
||||
use Storage;
|
||||
|
||||
use Validator;
|
||||
use Pterodactyl\Models;
|
||||
use Pterodactyl\Services\UuidService;
|
||||
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Exceptions\DisplayValidationException;
|
||||
|
||||
class Service
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
|
@ -49,7 +46,7 @@ class Service
|
|||
'description' => 'required|string',
|
||||
'file' => 'required|unique:services,file|regex:/^[\w.-]{1,50}$/',
|
||||
'executable' => 'max:255|regex:/^(.*)$/',
|
||||
'startup' => 'string'
|
||||
'startup' => 'string',
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
@ -86,7 +83,7 @@ class Service
|
|||
'description' => 'sometimes|required|string',
|
||||
'file' => 'sometimes|required|regex:/^[\w.-]{1,50}$/',
|
||||
'executable' => 'sometimes|max:255|regex:/^(.*)$/',
|
||||
'startup' => 'sometimes|string'
|
||||
'startup' => 'sometimes|string',
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
@ -94,7 +91,8 @@ class Service
|
|||
}
|
||||
|
||||
$service->fill($data);
|
||||
$service->save();
|
||||
|
||||
return $service->save();
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
|
@ -147,5 +145,4 @@ class Service
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue