Function backend::routes::content::read_post [−][src]
pub async fn read_post(
auth: Auth,
db: Connection<PgDb>,
post_id: i64,
page: Option<usize>
) -> (Status, Result<Json<PostPage>, Json<ErrorResponse>>)Expand description
Read a Specific Post
Parameters
Auth: Authenticated userConnection<PgDb>: Postgres connectioni64: Post idOption<usize>: Page number for post
Returns
Status: HTTP statusPostPage: Post detail information, including post and up to 10 replies
Errors
ErrorResponse: Error messageErrorCode::PostNotExistErrorCode::DatabaseErr