mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix(reload): WIP - store paths to config files
Paths given via --config are now stored inside the config struct at runtime, to make it possible to reload config without setting an env var for the config file location.
This commit is contained in:
@@ -30,8 +30,11 @@ pub(super) async fn show_config(&self) -> Result {
|
||||
|
||||
#[admin_command]
|
||||
pub(super) async fn reload_config(&self, path: Option<PathBuf>) -> Result {
|
||||
let path = path.as_deref().into_iter();
|
||||
self.services.config.reload(path)?;
|
||||
let mut paths = Vec::new();
|
||||
if let Some(p) = path {
|
||||
paths.push(p);
|
||||
}
|
||||
self.services.config.reload(&paths)?;
|
||||
|
||||
self.write_str("Successfully reconfigured.").await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user