forked from alemi/upub
fix: register cli command
This commit is contained in:
parent
4d7f99dfaa
commit
b9386c286a
1 changed files with 3 additions and 10 deletions
|
@ -1,5 +1,4 @@
|
||||||
use openssl::rsa::Rsa;
|
use crate::server::admin::Administrable;
|
||||||
use sea_orm::{EntityTrait, IntoActiveModel};
|
|
||||||
|
|
||||||
pub async fn register(
|
pub async fn register(
|
||||||
ctx: crate::server::Context,
|
ctx: crate::server::Context,
|
||||||
|
@ -20,12 +19,6 @@ pub async fn register(
|
||||||
).await?;
|
).await?;
|
||||||
|
|
||||||
tracing::info!("registered new user: {username}");
|
tracing::info!("registered new user: {username}");
|
||||||
}
|
|
||||||
|
Ok(())
|
||||||
// TODO duplicated, make an util?? idk
|
|
||||||
fn clean_domain(domain: &str) -> String {
|
|
||||||
domain
|
|
||||||
.replace("http://", "")
|
|
||||||
.replace("https://", "")
|
|
||||||
.replace('/', "")
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue