Skip to content

Commit

Permalink
chore: export get_url_path and get_url_query_part
Browse files Browse the repository at this point in the history
  • Loading branch information
andeya committed Nov 5, 2024
1 parent f16630e commit 2d872eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casdoor-rs-sdk"
version = "2.5.3"
version = "2.5.4"
edition = "2021"
license = "Apache-2.0"
description = "A Casdoor SDK (contain APIs) with more complete interfaces and better usability."
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ impl Sdk {
.map(Into::into)
}

pub(crate) fn get_url_path(&self, ident: impl Into<String>, add_owner_query: bool, query_args: impl Serialize) -> SdkResult<String> {
pub fn get_url_path(&self, ident: impl Into<String>, add_owner_query: bool, query_args: impl Serialize) -> SdkResult<String> {
Ok(format!("/api/{}?{}", ident.into(), self.get_url_query_part(add_owner_query, query_args)?))
}

pub(crate) fn get_url_query_part(&self, add_owner_query: bool, query_args: impl Serialize) -> SdkResult<String> {
pub fn get_url_query_part(&self, add_owner_query: bool, query_args: impl Serialize) -> SdkResult<String> {
let mut query = if add_owner_query {
format!("owner={}", self.org_name())
} else {
Expand Down

0 comments on commit 2d872eb

Please sign in to comment.