a34fe57
zhenyi
feat(lib): add new handlers and export views (db users_loader, repo readme/lifecycle/tree/PR/release, issue reopen, export sidebar/basic)
a34fe57
use uuid::Uuid;
use crate::error::PostResult;
use crate::features::PostService;
use super::usecase;
use super::{CreatePostBoardOption, ListPostQuery, PostBoardPage, PostBoardView, PostPage};
impl PostService {
pub async fn create_post_collection(
&self,
actor: Uuid,
space_id: Uuid,
input: CreatePostBoardOption,
) -> PostResult<PostBoardView> {
usecase::create_post_collection(self, actor, space_id, input).await
}
pub async fn list_post_collections(
&self,
actor: Uuid,
channel_id: Uuid,
) -> PostResult<PostBoardPage> {
usecase::list_post_collections(self, actor, channel_id).await
}
pub async fn list_posts(
&self,
actor: Uuid,
channel_id: Uuid,
q: ListPostQuery,
) -> PostResult<PostPage> {
usecase::list_posts(self, actor, channel_id, q).await
}
}