fix: register outbox route

This commit is contained in:
əlemi 2024-03-26 01:31:17 +01:00
parent f588df751f
commit b464aa0e98
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 2 additions and 1 deletions

View file

@ -70,8 +70,8 @@ pub async fn page(
pub async fn post( pub async fn post(
State(ctx): State<Context>, State(ctx): State<Context>,
Path(id): Path<String>, Path(id): Path<String>,
Json(activity): Json<serde_json::Value>,
AuthIdentity(auth): AuthIdentity, AuthIdentity(auth): AuthIdentity,
Json(activity): Json<serde_json::Value>,
) -> Result<impl IntoResponse, StatusCode> { ) -> Result<impl IntoResponse, StatusCode> {
match auth { match auth {
Identity::Anonymous => Err(StatusCode::UNAUTHORIZED), Identity::Anonymous => Err(StatusCode::UNAUTHORIZED),

View file

@ -24,6 +24,7 @@ pub async fn serve(db: DatabaseConnection, domain: String) {
.route("/users/:id/inbox", get(ap::user::inbox::get)) .route("/users/:id/inbox", get(ap::user::inbox::get))
.route("/users/:id/inbox", post(ap::user::inbox::post)) .route("/users/:id/inbox", post(ap::user::inbox::post))
.route("/users/:id/outbox", get(ap::user::outbox::get)) .route("/users/:id/outbox", get(ap::user::outbox::get))
.route("/users/:id/outbox", post(ap::user::outbox::post))
.route("/users/:id/outbox/page", get(ap::user::outbox::page)) .route("/users/:id/outbox/page", get(ap::user::outbox::page))
.route("/users/:id/followers", get(ap::user::follow___::<false>)) .route("/users/:id/followers", get(ap::user::follow___::<false>))
.route("/users/:id/following", get(ap::user::follow___::<true>)) .route("/users/:id/following", get(ap::user::follow___::<true>))