Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Lukas Wagner
On 2024-04-19 10:34, Fiona Ebner wrote: > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> +/// Get a list of all notification targets. >> +pub fn get_targets(config: &Config) -> Result, HttpError> { >> +let mut targets = Vec::new(); >> + >> +#[cfg(feature = "gotify")] >> +for endpoint

Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > +#[api] > +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd)] > +#[serde(rename_all = "kebab-case")] > +/// Target information > +pub struct Target { > +/// Name of the endpoint > +name: String, > +/// Origin of the en

Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > +/// Get a list of all notification targets. > +pub fn get_targets(config: &Config) -> Result, HttpError> { > +let mut targets = Vec::new(); > + > +#[cfg(feature = "gotify")] > +for endpoint in gotify::get_endpoints(config)? { > +targ