Clean things up a bit

This commit is contained in:
Marc Plano-Lesay 2025-05-02 14:23:12 +10:00
parent a91e243ecc
commit 3275f4890d
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
18 changed files with 572 additions and 249 deletions

View file

@ -1,7 +1,8 @@
use crate::app::Enableable;
use serde::{Deserialize, Serialize};
/// Configuration for the ntfy notification service
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NtfyConfig {
/// Whether to enable the ntfy notification service
#[serde(default)]
@ -21,3 +22,9 @@ pub struct NtfyConfig {
/// The topic to publish notifications to
pub topic: String,
}
impl Enableable for NtfyConfig {
fn is_enabled(&self) -> bool {
self.enable
}
}