diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-02 15:08:43 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-02 15:08:43 +0200 |
commit | c81d8bbfd46d53fba6e0086b5f859f8af8639f4a (patch) | |
tree | 8088fcfad28e9fae3a0a70853b5fd12204cde35a /common/src | |
parent | 0d6a5fb84d3e0016c80baa1849612f550db31a81 (diff) | |
download | jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar.bz2 jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar.zst |
refactor admin panel
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/lib.rs | 11 |
1 files changed, 10 insertions, 1 deletions
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 <metamuffin.org> */ -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<ImportOptions>, #[serde(default)] pub poster: Option<PathBuf>, #[serde(default)] pub backdrop: Option<PathBuf>, #[serde(default)] pub source: Option<MediaSource>, @@ -37,6 +38,14 @@ pub struct NodePublic { #[serde(default)] pub media: Option<MediaInfo>, } +#[rustfmt::skip] +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct ImportOptions { + pub host: String, + pub id: String, + #[serde(default)] pub prefix: Option<String>, +} + #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "snake_case")] pub enum NodeKind { |