chore: keep notification provider type lists in one place

Đang mở
#2,133 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Wikid82 đang làm issue này rồi.

Từ ngày 3/12/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

backend frontend low

What

The list of provider types that use JSON templates is kept by hand in two places that differ: frontend/src/pages/Notifications.tsx:23-28 (supportsJSONTemplates, eight types) and backend/internal/services/notification_service.go:139-146 (same eight plus generic). The frontend supported-type list (SUPPORTED_NOTIFICATION_PROVIDER_TYPES) is likewise separate from the backend's isSupportedNotificationProviderType.

Severity

Low (maintenance: a new provider type has to be added in several places).

Suggested approach

Derive the frontend checks from one exported constant (or serve the lists from the backend), and add a test that keeps frontend and backend lists in step.

Found while planning the notification delivery fix (#2103, #2104, #2101).

Ngôn ngữ chính
Go
Star
17
Fork
2
Merge trung bình
1 giờ 42 phút
Pull request đã merge (30 ngày)
173

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Wikid82/Charon

Tất cả issue của Wikid82/Charon

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.