remove nesting layer
This commit is contained in:
parent
222a552017
commit
621b05570a
|
@ -1,4 +1,4 @@
|
|||
pub mod instance {
|
||||
|
||||
use reqwest::Client;
|
||||
use serde_json::from_str;
|
||||
|
||||
|
@ -11,9 +11,7 @@ pub mod instance {
|
|||
# Errors
|
||||
[`InstanceServerError`] - If the request fails.
|
||||
*/
|
||||
pub async fn instance_policies_schema(
|
||||
&self,
|
||||
) -> Result<InstancePolicies, InstanceServerError> {
|
||||
pub async fn instance_policies_schema(&self) -> Result<InstancePolicies, InstanceServerError> {
|
||||
let client = Client::new();
|
||||
let endpoint_url = self.urls.get_api().to_string() + "/policies/instance/";
|
||||
let request = match client.get(&endpoint_url).send().await {
|
||||
|
@ -37,7 +35,6 @@ pub mod instance {
|
|||
Ok(instance_policies_schema)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod instance_policies_schema_test {
|
||||
|
|
Loading…
Reference in New Issue