feat: domain blocker plugin
Some checks failed
ci/woodpecker/tag/release Pipeline was successful
ci/woodpecker/push/ci Pipeline failed

This commit is contained in:
Felipe M 2025-04-22 18:09:27 +02:00
parent c9edb57505
commit 7dd02c0056
Signed by: fmartingr
GPG key ID: CCFBC5637D4000A8
25 changed files with 898 additions and 63 deletions

View file

@ -386,6 +386,24 @@ func (d *Database) UpdateChannelPlugin(id int64, enabled bool) error {
return err
}
// UpdateChannelPluginConfig updates a channel plugin's configuration
func (d *Database) UpdateChannelPluginConfig(id int64, config map[string]interface{}) error {
// Convert config to JSON
configJSON, err := json.Marshal(config)
if err != nil {
return err
}
query := `
UPDATE channel_plugin
SET config = ?
WHERE id = ?
`
_, err = d.db.Exec(query, string(configJSON), id)
return err
}
// DeleteChannelPlugin deletes a channel plugin
func (d *Database) DeleteChannelPlugin(id int64) error {
query := `