This commit is contained in:
Felix Ableitner 2024-04-08 15:01:15 +02:00
parent 2cd31014b3
commit c026827672
3 changed files with 3 additions and 2 deletions

View file

@ -28,6 +28,7 @@ pub async fn new_instance(
.domain(hostname)
.signed_fetch_actor(&system_user)
.app_data(database)
.url_verifier(Box::new(MyUrlVerifier()))
.debug(true)
.build()
.await?;

View file

@ -127,7 +127,7 @@ async fn fetch_object_http_with_accept<T: Clone, Kind: DeserializeOwned>(
// Dont allow fetching local object. Only check this after the request as a local url
// may redirect to a remote object.
if data.config.is_local_url(&url) {
return Err(Error::NotFound.into());
return Err(Error::NotFound);
}
match serde_json::from_slice(&text) {

View file

@ -340,7 +340,7 @@ const _IMPL_DIESEL_NEW_TYPE_FOR_OBJECT_ID: () = {
#[cfg(test)]
pub mod tests {
use super::*;
use crate::{fetch::object_id::should_refetch_object, traits::tests::DbUser};
use crate::traits::tests::DbUser;
#[test]
fn test_deserialize() {