Skip to content

Commit 2f7bbfa

Browse files
committed
spaces
1 parent 49c5a45 commit 2f7bbfa

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/pages.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub mod page_service {
22
use reqwest::Response;
3-
use crate::model::models::{Content, CreatePage, ContentResponse, SearchResults, CreatePageSpace, PageBody, Storage};
3+
use crate::model::models::{Content, CreatePage, ContentResponse, SearchResults, CreatePageSpace, PageBody, Storage, Ancestor};
44

55
pub async fn get_page(url: &str, token: String, id: String) -> Content {
66
let request_url = format!("{url}/rest/api/content/{id}?expand=body.storage.value,ancestors");
@@ -77,7 +77,9 @@ pub mod page_service {
7777
value: page.body.storage.value,
7878
},
7979
},
80-
ancestors: page.a,
80+
ancestors: vec![Ancestor {
81+
id: page.ancetors[0].id.parse::<i32>().unwrap(),
82+
}],
8183
})
8284
.header("Content-Type", "application/json")
8385
.header("Authorization", format!("Basic {token}"))
@@ -87,17 +89,13 @@ pub mod page_service {
8789
}
8890

8991
// todo
90-
pub async fn move_page(conf_url: &str, token: &str, page: CreatePage) -> String {
92+
pub async fn move_page(conf_url: &str, token: &str, page_id: String) -> String {
9193
return String::from("");
9294
}
9395

9496
// todo
9597
// {url}/rest/api/content/{id}/child/attachment
9698
pub async fn get_page_attachments() {
9799
// /download/attachments/{page_id}/{file]?version=1&modificationDate=1679505520993&api=v2
98-
99100
}
100-
}
101-
102-
103101
}

0 commit comments

Comments
 (0)