Clean things up a bit
This commit is contained in:
parent
a91e243ecc
commit
3275f4890d
18 changed files with 572 additions and 249 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue