fix & chore: handle hostname/URL cleaning within trait implementation
SUMMARY Renamed function parameters from "hostname" to "url" wherever a url::Url is received db_core::get_hostname is renamed to db_core::clean_url, better describing its new implementation forge_core::get_hostname is renamed to forge_core::get_url to better describe its new implementation URL PROCESSING METHODS federate/federate-core Parses URL and returns only the hostname db/db-core Parses URL, cleans it by removing path and query parameters and returns the end result
This commit is contained in:
parent
fe8bd2fb26
commit
9a3425eabe
2 changed files with 1 additions and 2 deletions
|
@ -210,7 +210,7 @@ pub trait SCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
|
|||
/// get user data
|
||||
async fn get_user(&self, username: &str, url: &Url) -> DBResult<User>;
|
||||
|
||||
/// check if an user exists. When url of a forge instace is provided, username search is
|
||||
/// check if an user exists. When url of a forge instance is provided, username search is
|
||||
/// done only on that forge
|
||||
async fn user_exists(&self, username: &str, url: Option<&Url>) -> DBResult<bool>;
|
||||
|
||||
|
|
|
@ -161,7 +161,6 @@ impl Federate for PccFederate {
|
|||
Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
/// create user instance
|
||||
async fn create_user(&self, f: &AddUser<'_>) -> Result<(), Self::Error> {
|
||||
let path = self.get_user_path(f.username, &f.url, true).await?;
|
||||
|
|
Loading…
Reference in a new issue