Function backend::routes::content::create_reply[][src]

pub async fn create_reply(
    auth: Auth,
    db: Connection<PgDb>,
    reply_info: Json<ReplyInfo>,
    producer: Connection<PulsarMq>
) -> (Status, Result<Json<ReplyCreateResponse>, Json<ErrorResponse>>)
Expand description

Create Reply

Parameters

  • Auth: Authenticated user
  • Connection<PgDb>: Postgres connection
  • Json<ReplyInfo>: Reply information
  • Connection<PulsarMq>: Pulsar connection

Returns

  • Status: HTTP status
  • PostCreateResponse: Response of create reply

Errors

  • ErrorResponse: Error message
    • ErrorCode::PostNotExist
    • ErrorCode::UserNotExist
    • ErrorCode::UserForbidden
    • ErrorCode::BurrowInvalid
    • ErrorCode::DatabaseErr