Function backend::routes::content::update_post [−][src]
pub async fn update_post(
auth: Auth,
db: Connection<PgDb>,
post_id: i64,
post_info: Json<PostUpdateInfo>,
producer: Connection<PulsarMq>
) -> (Status, Result<String, Json<ErrorResponse>>)Expand description
Update Post
Parameters
Auth: Authenticated userConnection<PgDb>: Postgres connectioni64: Post idJson<PostUpdateInfo>: Updated post informationConnection<PulsarMq: Pulsar MQ connection
Returns
Status: HTTP statusString: “Success”
Errors
ErrorResponse: Error messageErrorCode::EmptyFieldErrorCode::SectionInvalidErrorCode::PostNotExistErrorCode::UserNotExistErrorCode::UserForbiddenErrorCode::BurrowInvalidErrorCode::DatabaseErr