瀏覽代碼

feat: template update

igb 4 月之前
父節點
當前提交
d739b8a1fc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Services/TemplateUpdater.php

+ 5 - 0
app/Services/TemplateUpdater.php

@@ -5,6 +5,7 @@ namespace App\Services;
 use App\Models\DistAppearancePublishList;
 use App\Models\DistAppearanceTemplate;
 use Illuminate\Support\Facades\Storage;
+use function PHPUnit\Framework\isEmpty;
 
 class TemplateUpdater
 {
@@ -41,6 +42,10 @@ class TemplateUpdater
             ->first();
 
 
+
+        if (!$publishList) {
+            return "No publishList templates found in dist_appearance_template for dist_id: $dist?->id, appearance_id: $dist?->appearance_id.";
+        }
         // 获取 template_update_code
         $updateCode = $publishList->template_update_code;