Skip to content

Modern Docker Management, Designed for Everyone

fix: notification settings not able to be saved due to incorrect key

Kyle Mendell4cd7ff51c4b1
diff --git a/backend/internal/api/notification_handler.go b/backend/internal/api/notification_handler.go
index e86cddcdf..2f11a0639 100644
--- a/backend/internal/api/notification_handler.go
+++ b/backend/internal/api/notification_handler.go
@@ -178,6 +178,11 @@ func (h *NotificationHandler) CreateOrUpdateAppriseSettings(c *gin.Context) {
return
}
+ if req.Enabled && req.APIURL == "" {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "API URL is required when Apprise is enabled"})
+ return
+ }
+
settings, err := h.appriseService.CreateOrUpdateSettings(
c.Request.Context(),
req.APIURL,
diff --git a/backend/internal/dto/notification_dto.go b/backend/internal/dto/notification_dto.go
index ddd5bb108..61d0da622 100644
--- a/backend/internal/dto/notification_dto.go
+++ b/backend/internal/dto/notification_dto.go
@@ -16,7 +16,7 @@ type NotificationSettingsResponse struct {
}
type AppriseSettingsRequest struct {
- APIURL string `json:"apiUrl" binding:"required"`
+ APIURL string `json:"apiUrl"`
Enabled bool `json:"enabled"`
ImageUpdateTag string `json:"imageUpdateTag"`
ContainerUpdateTag string `json:"containerUpdateTag"`