hotfix update custom config

This commit is contained in:
kirillius 2025-06-05 14:17:51 +03:00
parent a128de0bc6
commit a3909860d2
2 changed files with 7 additions and 2 deletions

View File

@ -14,9 +14,9 @@ class Custom extends Plugin
$this->updateConfigFile(); $this->updateConfigFile();
} }
private function updateConfigFile() public function updateConfigFile()
{ {
$path = dirname(__DIR__) . "/networks/custom.json"; $path = dirname(__DIR__, 2) . "/networks/custom.json";
$current_config = @file_get_contents($path); $current_config = @file_get_contents($path);
$new_config = json_encode($this->config); $new_config = json_encode($this->config);
if($current_config !== $new_config) { if($current_config !== $new_config) {

View File

@ -0,0 +1,5 @@
import {App} from "/assets/App.js";
(async function(){
await App.RPC.__invoke("custom::updateConfigFile")
})();