alroyso 1 年之前
父节点
当前提交
1bd368c246
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      lib/app/controller/core.dart

+ 6 - 1
lib/app/controller/core.dart

@@ -88,7 +88,12 @@ class CoreController extends GetxController {
   }
 
   Future<void> changeConfig(String configPath) async{
-    await dio.put('/configs', data: {"path": configPath});
+    try{
+      await dio.put('/configs', data: {"path": configPath});
+    }
+    catch(e){
+      await dio.put('/configs', data: {"path": configPath});
+    }
   }
 
   // type updateConfigRequest struct {