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: ) -> Result, HttpError> {
>> +let mut targets = Vec::new();
>> +
>> +#[cfg(feature = "gotify")]
>> +for endpoint in
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
Am 09.04.24 um 15:25 schrieb Lukas Wagner:
> +/// Get a list of all notification targets.
> +pub fn get_targets(config: ) -> Result, HttpError> {
> +let mut targets = Vec::new();
> +
> +#[cfg(feature = "gotify")]
> +for endpoint in gotify::get_endpoints(config)? {
> +
This method allows us to get a list of all notification targets.
Signed-off-by: Lukas Wagner
---
proxmox-notify/src/api/mod.rs | 75 +++
1 file changed, 75 insertions(+)
diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src/api/mod.rs
index