Function backend::routes::content::delete_post [−][src]
pub async fn delete_post(
auth: Auth,
db: Connection<PgDb>,
post_id: i64,
producer: Connection<PulsarMq>
) -> (Status, Result<String, Json<ErrorResponse>>)
Expand description
Delete Post
Parameters
Auth
: Authenticated userConnection<PgDb>
: Postgres connectioni64
: Post idConnection<PulsarMq>
: Pulsar connection
Returns
Status
: HTTP statusString
: “Success”
Errors
ErrorResponse
: Error messageErrorCode::PostNotExist
ErrorCode::UserNotExist
ErrorCode::UserForbidden
ErrorCode::BurrowInvalid
ErrorCode::DatabaseErr