fix: use local service-templates in dev
This commit is contained in:
parent
282ff4e670
commit
370a0b1eec
1 changed files with 5 additions and 0 deletions
|
|
@ -522,6 +522,11 @@ function sslip(Server $server)
|
||||||
|
|
||||||
function get_service_templates(bool $force = false): Collection
|
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) {
|
if ($force) {
|
||||||
try {
|
try {
|
||||||
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue