From c81d8bbfd46d53fba6e0086b5f859f8af8639f4a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 2 Aug 2023 15:08:43 +0200 Subject: refactor admin panel --- common/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'common/src') diff --git a/common/src/lib.rs b/common/src/lib.rs index 3f91a6c..34de946 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -3,8 +3,8 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin */ -pub mod r#impl; pub mod config; +pub mod r#impl; use bincode::{Decode, Encode}; use serde::{Deserialize, Serialize}; @@ -19,6 +19,7 @@ pub struct Node { #[rustfmt::skip] #[derive(Debug, Clone, Deserialize, Serialize)] pub struct NodePrivate { + #[serde(default)] pub import: Option, #[serde(default)] pub poster: Option, #[serde(default)] pub backdrop: Option, #[serde(default)] pub source: Option, @@ -37,6 +38,14 @@ pub struct NodePublic { #[serde(default)] pub media: Option, } +#[rustfmt::skip] +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct ImportOptions { + pub host: String, + pub id: String, + #[serde(default)] pub prefix: Option, +} + #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "snake_case")] pub enum NodeKind { -- cgit v1.2.3-70-g09d2