Function backend::routes::content::read_post_list [−][src]
pub async fn read_post_list(
auth: Auth,
db: Connection<PgDb>,
page: Option<usize>,
section: Vec<String>,
conn: Connection<TypesenseSearch>
) -> (Status, Result<Json<ListPage>, Json<ErrorResponse>>)Expand description
Read a List of Posts with Number Up to Ten
Parameters
Auth: Authenticated userConnection<PgDb>: Postgres connectionOption<usize>: Page number for postVec<String>: Section of PostConnection<TypesenseSearch>: Typesense connection
Returns
Status: HTTP statusListPage: A List of post information
Errors
ErrorResponse: Error messageErrorCode::PostNotExistErrorCode::DatabaseErr