Am 09.04.24 um 15:25 schrieb Lukas Wagner:
> +/// Get a list of all notification targets.
> +pub fn get_targets(config: &Config) -> Result<Vec<Target>, HttpError> {
> +    let mut targets = Vec::new();
> +
> +    #[cfg(feature = "gotify")]
> +    for endpoint in gotify::get_endpoints(config)? {
> +        targets.push(Target {
> +            name: endpoint.name,
> +            origin: endpoint.origin.unwrap_or(Origin::UserCreated),
> +            endpoint_type: EndpointType::Gotify,
> +            disable: endpoint.disable,
> +            comment: endpoint.comment,
> +        })

Would it make sense to have into() functions for
{Gotify,Sendmail,Smtp}Config -> Target ?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to