Files
DiunDashboard/pkg/diunwebhook/export_test.go
Jean-Luc Makiola c0746a7f02
All checks were successful
CI / build-test (push) Successful in 1m28s
**feat(webhook):** add WEBHOOK_SECRET for token authentication support
- Protect `/webhook` endpoint using the `Authorization` header
- Update `README.md` with setup instructions and examples for authentication
- Warn when `WEBHOOK_SECRET` is not configured
- Add tests for valid, missing, and invalid token scenarios
- Update `docker-compose.yml` to support `WEBHOOK_SECRET` configuration
2026-02-27 14:58:43 +01:00

20 lines
290 B
Go

package diunwebhook
func GetUpdatesMap() map[string]UpdateEntry {
m, _ := GetUpdates()
return m
}
func UpdatesReset() {
InitDB(":memory:")
}
func ResetTags() {
db.Exec(`DELETE FROM tag_assignments`)
db.Exec(`DELETE FROM tags`)
}
func ResetWebhookSecret() {
SetWebhookSecret("")
}