mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-10-12 09:17:27 +02:00
feat: Add notification service structure to new notification form
- Introduced a new struct for NotificationService within the notification form data, encompassing various configuration fields for services like Pushbullet, Ntfy, Gotify, and Pushover. - This addition enhances the form's capability to manage detailed service configurations, improving user experience and flexibility in notification management.
This commit is contained in:
1 parent
9249b84ddd
commit
405b2e605e
23 files changed
+37
No files matched your search
@@ -1169,6 +1169,43 @@ func (h *Handlers) HandleNewNotificationPage(c *gin.Context) {
|
||||
|
||||
data := components.NotificationFormData{
|
||||
IsNew: true,
|
||||
NotificationService: &struct {
|
||||
ID uint
|
||||
Name string
|
||||
Description string
|
||||
Type string
|
||||
IsEnabled bool
|
||||
EventTriggers []string
|
||||
RetryPolicy string
|
||||
WebhookURL string
|
||||
Method string
|
||||
Headers string
|
||||
PayloadTemplate string
|
||||
SecretKey string
|
||||
PushbulletAPIKey string
|
||||
PushbulletDeviceID string
|
||||
PushbulletTitleTemplate string
|
||||
PushbulletBodyTemplate string
|
||||
NtfyServer string
|
||||
NtfyTopic string
|
||||
NtfyPriority string
|
||||
NtfyUsername string
|
||||
NtfyPassword string
|
||||
NtfyTitleTemplate string
|
||||
NtfyMessageTemplate string
|
||||
GotifyURL string
|
||||
GotifyToken string
|
||||
GotifyPriority string
|
||||
GotifyTitleTemplate string
|
||||
GotifyMessageTemplate string
|
||||
PushoverAPIToken string
|
||||
PushoverUserKey string
|
||||
PushoverDevice string
|
||||
PushoverPriority string
|
||||
PushoverSound string
|
||||
PushoverTitleTemplate string
|
||||
PushoverMessageTemplate string
|
||||
}{},
|
||||
}
|
||||
|
||||
ctx := h.CreateTemplateContext(c)
|
||||
|
||||
Reference in new issue
Block a user