Skip to content

Commit 75de060

Browse files
committed
Fix pack selector
1 parent c4a4b84 commit 75de060

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/Http/Controllers/Admin/ServersController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function postNewServerOptionDetails(Request $request)
276276
->first();
277277

278278
return response()->json([
279-
'packs' => Models\ServicePack::select('uuid', 'name', 'version')->where('option', $request->input('option'))->where('selectable', true)->get(),
279+
'packs' => Models\ServicePack::select('id', 'name', 'version')->where('option', $request->input('option'))->where('selectable', true)->get(),
280280
'variables' => Models\ServiceVariables::where('option_id', $request->input('option'))->get(),
281281
'exec' => $option->executable,
282282
'startup' => $option->startup

app/Repositories/ServerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function create(array $data)
8686
'disk' => 'required|numeric|min:0',
8787
'service' => 'bail|required|numeric|min:1|exists:services,id',
8888
'option' => 'bail|required|numeric|min:1|exists:service_options,id',
89-
'pack' => 'bail|required|numeric|min:0'
89+
'pack' => 'bail|required|numeric|min:0',
9090
'startup' => 'string',
9191
'custom_image_name' => 'required_if:use_custom_image,on',
9292
'auto_deploy' => 'sometimes|boolean'

resources/views/admin/servers/new.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
$('input[name="startup"]').val(data.startup);
450450
451451
$.each(data.packs, function (i, item) {
452-
$('#getPack').append('<option value="' + item.uuid + '">' + item.name + ' (' + item.version + ')</option>');
452+
$('#getPack').append('<option value="' + item.id + '">' + item.name + ' (' + item.version + ')</option>');
453453
});
454454
$('#getPack').append('<option value="0">No Service Pack</option>').parent().parent().removeClass('hidden');
455455

0 commit comments

Comments
 (0)