diff --git a/src/apub.rs b/src/apub.rs index 48f64d4..a99cacc 100644 --- a/src/apub.rs +++ b/src/apub.rs @@ -33,13 +33,14 @@ pub struct PublicKey { #[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "PascalCase")] pub enum ValidTypes { - Add, Accept, + Add, Announce, Create, Delete, Follow, Reject, + Remove, Undo, Update, } diff --git a/src/error.rs b/src/error.rs index dde9ba3..2f9e658 100644 --- a/src/error.rs +++ b/src/error.rs @@ -197,7 +197,8 @@ impl ResponseError for Error { ErrorKind::Kind(_) | ErrorKind::MissingKind | ErrorKind::MissingId - | ErrorKind::ObjectCount | ErrorKind::NoSignature(_) => StatusCode::BAD_REQUEST, + | ErrorKind::ObjectCount + | ErrorKind::NoSignature(_) => StatusCode::BAD_REQUEST, _ => StatusCode::INTERNAL_SERVER_ERROR, } } diff --git a/src/routes/inbox.rs b/src/routes/inbox.rs index 991084b..18ff8da 100644 --- a/src/routes/inbox.rs +++ b/src/routes/inbox.rs @@ -82,7 +82,7 @@ pub(crate) async fn route( handle_announce(&state, &jobs, input, actor).await? } ValidTypes::Follow => handle_follow(&config, &jobs, input, actor).await?, - ValidTypes::Add | ValidTypes::Delete | ValidTypes::Update => { + ValidTypes::Add | ValidTypes::Delete | ValidTypes::Remove | ValidTypes::Update => { handle_forward(&jobs, input, actor).await? } ValidTypes::Undo => handle_undo(&config, &jobs, input, actor, is_connected).await?,