use crate::APUB_JSON_CONTENT_TYPE; use actix_web::{body::Body, HttpResponse}; use serde::Serialize; pub mod comment; pub mod community; pub mod post; pub mod user; /// Convert the data to json and turn it into an HTTP Response with the correct ActivityPub /// headers. fn create_apub_response(data: &T) -> HttpResponse where T: Serialize, { HttpResponse::Ok() .content_type(APUB_JSON_CONTENT_TYPE) .json(data) } fn create_apub_tombstone_response(data: &T) -> HttpResponse where T: Serialize, { HttpResponse::Gone() .content_type(APUB_JSON_CONTENT_TYPE) .json(data) }