Skip to content
Snippets Groups Projects
Commit 4d695da2 authored by Jonas Leder's avatar Jonas Leder
Browse files

implement GetConfig

parent 6861d903
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ go 1.23.4 ...@@ -4,7 +4,7 @@ go 1.23.4
require ( require (
gorm.io/gorm v1.25.12 gorm.io/gorm v1.25.12
jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.8 jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.9
) )
require ( require (
... ...
......
...@@ -93,6 +93,12 @@ func (g *GotifyPlugin) SetConfig(jsonConfig string, configId uint) error { ...@@ -93,6 +93,12 @@ func (g *GotifyPlugin) SetConfig(jsonConfig string, configId uint) error {
return g.db.Save(&config).Error return g.db.Save(&config).Error
} }
func (g *GotifyPlugin) GetConfig(configId uint) interface{} {
config := GotifyPluginConfig{}
g.db.Where(GotifyPluginConfig{ID: configId}).First(&config)
return config
}
var Plugin = GotifyPlugin{ var Plugin = GotifyPlugin{
metadata: plugininterface.PluginMetadata{ metadata: plugininterface.PluginMetadata{
Name: "Gotify", Name: "Gotify",
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment