-
-
Notifications
You must be signed in to change notification settings - Fork 267
Description
Description should have its own endpoint & permission
panel/app/Http/Controllers/Api/Client/Servers/SettingsController.php
Lines 30 to 56 in 324fc4b
| public function rename(RenameServerRequest $request, Server $server): JsonResponse | |
| { | |
| $name = $request->input('name'); | |
| $description = $request->has('description') ? (string) $request->input('description') : $server->description; | |
| $server->name = $name; | |
| if (config('panel.editable_server_descriptions')) { | |
| $server->description = $description; | |
| } | |
| $server->save(); | |
| if ($server->name !== $name) { | |
| Activity::event('server:settings.rename') | |
| ->property(['old' => $server->name, 'new' => $name]) | |
| ->log(); | |
| } | |
| if ($server->description !== $description) { | |
| Activity::event('server:settings.description') | |
| ->property(['old' => $server->description, 'new' => $description]) | |
| ->log(); | |
| } | |
| return new JsonResponse([], Response::HTTP_NO_CONTENT); | |
| } |
Fixed in vehikl/pest 0882358
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🟢 easyGood for newcomersGood for newcomers