mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-24 11:25:56 +00:00
Bot deploy shows the module's refusal; modules update only when the owner asks
- Deploy: a refusal text of the bot module (switched off, rejected, 0 created) is an error, not a started job; the outdated-module message points to the Modules page. - Modules: a module whose build differs from the commit the core recommends shows an Update button. Nothing updates by itself, not even on a core change. Needs the world stopped, merges the module's settings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5db6691b8b
commit
e8bf35f95d
16 files changed
+233
-8
No files matched your search
@@ -1654,6 +1654,23 @@ async fn repair_server(
|
||||
.await
|
||||
}
|
||||
|
||||
/// Rebuild an installed module from the commit this server's core recommends. Only ever called by the owner's
|
||||
/// click on "Update": nothing updates a module on its own. The world must be stopped; settings are merged.
|
||||
#[tauri::command]
|
||||
async fn module_update(
|
||||
state: State<'_, AppState>,
|
||||
id: String,
|
||||
module: String,
|
||||
) -> std::result::Result<String, UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
let _guard = BusyGuard::acquire(&state, &id)?;
|
||||
blocking(move || {
|
||||
coa_core::plugins::require_server_stopped(&root)?;
|
||||
coa_core::rebuild::update_to_recommended(&root, &module).map_err(Error::Invalid)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn module_set_enabled(
|
||||
state: State<'_, AppState>,
|
||||
@@ -3826,6 +3843,7 @@ pub fn run() {
|
||||
repair_server,
|
||||
plugins_repair,
|
||||
module_set_enabled,
|
||||
module_update,
|
||||
module_settings,
|
||||
module_save_settings,
|
||||
all_settings,
|
||||
|
||||
Reference in new issue
Block a user