forked from Alex/Pterodactyl-Panel
allow emptying server description, closes #442
This commit is contained in:
parent
0e48c94918
commit
9116547e98
@ -15,6 +15,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||
### Changed
|
||||
* Renamed session cookies from `laravel_session` to `pterodactyl_session`.
|
||||
* Sessions are now encrypted before being stored as an additional layer of security.
|
||||
* It is now possible to clear out a server description and have it be blank, rather than throwing an error about the field being required.
|
||||
|
||||
## v0.6.0 (Courageous Carniadactylus)
|
||||
### Fixed
|
||||
|
@ -273,9 +273,12 @@ class ServersController extends Controller
|
||||
{
|
||||
$repo = new ServerRepository;
|
||||
try {
|
||||
$repo->updateDetails($id, $request->intersect([
|
||||
'owner_id', 'name', 'description', 'reset_token',
|
||||
]));
|
||||
$repo->updateDetails($id, array_merge(
|
||||
$request->only('description'),
|
||||
$request->intersect([
|
||||
'owner_id', 'name', 'reset_token',
|
||||
])
|
||||
));
|
||||
|
||||
Alert::success('Server details were successfully updated.')->flash();
|
||||
} catch (DisplayValidationException $ex) {
|
||||
|
@ -370,7 +370,7 @@ class ServerRepository
|
||||
$validator = Validator::make($data, [
|
||||
'owner_id' => 'sometimes|required|integer|exists:users,id',
|
||||
'name' => 'sometimes|required|regex:([\w .-]{1,200})',
|
||||
'description' => 'sometimes|required|string',
|
||||
'description' => 'sometimes|nullable|string',
|
||||
'reset_token' => 'sometimes|required|accepted',
|
||||
]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user