mirror of
https://github.com/komari-monitor/komari.git
synced 2026-11-16 19:50:44 +00:00
js通知沿用旧版本的逻辑
This commit is contained in:
1 parent
13cbdca545
commit
1b76b7ad5b
2 files changed
+6
-3
No files matched your search
@@ -18,6 +18,9 @@ import (
|
||||
// DataDir confines notification scripts' filesystem and local module access.
|
||||
var DataDir = "./data/notification/javascript"
|
||||
|
||||
// ChannelID is also the key of existing JavaScript configurations in the database.
|
||||
const ChannelID = "Javascript"
|
||||
|
||||
const executionTimeout = 30 * time.Second
|
||||
|
||||
type JavaScriptSender struct {
|
||||
@@ -100,7 +103,7 @@ func (j *JavaScriptSender) Unload() error {
|
||||
}
|
||||
|
||||
func Register() error {
|
||||
return messageSender.RegisterNotificationChannel("javascript", messageSender.ManagedConfiguration("JavaScript", Addition{}), &JavaScriptSender{})
|
||||
return messageSender.RegisterNotificationChannel(ChannelID, messageSender.ManagedConfiguration("JavaScript", Addition{}), &JavaScriptSender{})
|
||||
}
|
||||
|
||||
var _ messageSender.NotificationChannel = (*JavaScriptSender)(nil)
|
||||
Reference in new issue
Block a user