cm get config

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-11-08 11:28:59 +08:00
parent 36b574a5f8
commit 1902134f03
6 changed files with 33 additions and 9 deletions

View File

@@ -408,6 +408,12 @@ async fn handle(data: Data, stream: &mut Connection) {
} else {
None
};
} else if name == "hide_cm" {
value = if crate::hbbs_http::sync::is_pro() {
Some(hbb_common::password_security::hide_cm().to_string())
} else {
None
};
} else {
value = None;
}
@@ -699,7 +705,7 @@ where
}
#[tokio::main(flavor = "current_thread")]
async fn get_config(name: &str) -> ResultType<Option<String>> {
pub async fn get_config(name: &str) -> ResultType<Option<String>> {
get_config_async(name, 1_000).await
}