1
0
Fork 0
forked from alemi/upub

fix: log what comes to our inbox

This commit is contained in:
əlemi 2024-03-22 01:41:42 +01:00
parent 5eec008343
commit 5c1ee72d68
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -85,6 +85,7 @@ pub async fn inbox(
Path(_id): Path<String>,
Json(object): Json<serde_json::Value>
) -> Result<JsonLD<serde_json::Value>, StatusCode> {
tracing::info!("received object on inbox: {}", serde_json::to_string_pretty(&object).unwrap());
match object.base_type() {
None => { Err(StatusCode::BAD_REQUEST) },
Some(BaseType::Link(_x)) => Err(StatusCode::UNPROCESSABLE_ENTITY), // we could but not yet