Tranga/API/APIEndpointRecords/NtfyRecord.cs
Glax 022ebe2bcc Arbitrary Webhook for NotificationConnectors
Backend only deals in REST Webhooks
The API has custom Endpoints for Ntfy, Gotify, Lunasea that create pre-formatted Webhooks
#297 #259
2025-03-07 16:30:32 +01:00

17 lines
462 B
C#

namespace API.APIEndpointRecords;
public record NtfyRecord(string endpoint, string username, string password, string topic, int priority)
{
public bool Validate()
{
if (endpoint == string.Empty)
return false;
if (username == string.Empty)
return false;
if (password == string.Empty)
return false;
if (priority < 1 || priority > 5)
return false;
return true;
}
}