-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add endpoint for getting page view collab (#831)
- Loading branch information
1 parent
44d76bb
commit 0b193e1
Showing
10 changed files
with
410 additions
and
2 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.sqlx/query-84c224af99f654e2e0ba11a411376794855483eedb0c30b1873ed660ca8d10cd.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use client_api_entity::workspace_dto::PageCollab; | ||
use reqwest::Method; | ||
use shared_entity::response::{AppResponse, AppResponseError}; | ||
use uuid::Uuid; | ||
|
||
use crate::Client; | ||
|
||
impl Client { | ||
pub async fn get_workspace_page_view( | ||
&self, | ||
workspace_id: Uuid, | ||
view_id: Uuid, | ||
) -> Result<PageCollab, AppResponseError> { | ||
let url = format!( | ||
"{}/api/workspace/{}/page_view/{}", | ||
self.base_url, workspace_id, view_id | ||
); | ||
let resp = self | ||
.http_client_with_auth(Method::GET, &url) | ||
.await? | ||
.send() | ||
.await?; | ||
AppResponse::<PageCollab>::from_response(resp) | ||
.await? | ||
.into_data() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod access_control; | ||
pub mod ops; | ||
pub mod page_view; | ||
pub mod publish; | ||
pub mod publish_dup; |
Oops, something went wrong.