fix: image and icon live under url

This commit is contained in:
əlemi 2024-04-14 03:39:52 +02:00
parent 8b10bde544
commit a735e16f73
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,6 +1,6 @@
use sea_orm::entity::prelude::*; use sea_orm::entity::prelude::*;
use apb::{Collection, Actor, PublicKey, ActorType}; use apb::{Collection, Object, Actor, PublicKey, ActorType};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "users")] #[sea_orm(table_name = "users")]
@ -47,8 +47,8 @@ impl Model {
name: object.name().map(|x| x.to_string()), name: object.name().map(|x| x.to_string()),
summary: object.summary().map(|x| x.to_string()), summary: object.summary().map(|x| x.to_string()),
icon: object.icon().id(), icon: object.icon().id(),
image: object.image().id(), image: object.image().get().map(|x| x.url().id().unwrap_or_default()),
inbox: object.inbox().id(), inbox: object.inbox().get().map(|x| x.url().id().unwrap_or_default()),
outbox: object.inbox().id(), outbox: object.inbox().id(),
shared_inbox: None, // TODO!!! parse endpoints shared_inbox: None, // TODO!!! parse endpoints
followers: object.followers().id(), followers: object.followers().id(),