Skip to content

Commit

Permalink
fix(ui): simplify service templates loading logic
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Feb 4, 2025
1 parent d8aae12 commit 8033a89
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion app/Livewire/Project/New/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function updatedSelectedEnvironment()

public function loadServices()
{
$services = get_service_templates(true);
$services = get_service_templates();
$services = collect($services)->map(function ($service, $key) {
$default_logo = 'images/default.webp';
$logo = data_get($service, 'logo', $default_logo);
Expand Down
4 changes: 0 additions & 4 deletions bootstrap/helpers/shared.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,7 @@ function sslip(Server $server)

function get_service_templates(bool $force = false): Collection
{
if (isDev()) {
$services = File::get(base_path('templates/service-templates.json'));

return collect(json_decode($services))->sortKeys();
}
if ($force) {
try {
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
Expand Down

0 comments on commit 8033a89

Please sign in to comment.