From 34b7db5ce6ca7bb7909dec2f76633bc2418c4d9b Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 23 Mar 2024 20:24:29 +0100 Subject: [PATCH] feat: default for config --- src/model/config.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/model/config.rs b/src/model/config.rs index c1326457..b34df1d3 100644 --- a/src/model/config.rs +++ b/src/model/config.rs @@ -12,6 +12,19 @@ pub struct Model { pub show_following: bool, } +impl Default for Model { + fn default() -> Self { + Model { + id: "".to_string(), + accept_follow_requests: true, + show_following_count: true, + show_following: true, + show_followers_count: true, + show_followers: true, + } + } +} + #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(