Implement single choice value load/save

This commit is contained in:
Benedikt Kulmann
2020-05-07 11:29:51 +02:00
parent e44654dc9d
commit d6cd343b62
9 changed files with 188 additions and 93 deletions
+3 -3
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -24,6 +24,7 @@ func NewService(cfg *config.Config) Service {
}
func (g Service) SaveSettingsBundle(c context.Context, req *proto.SaveSettingsBundleRequest, res *proto.SaveSettingsBundleResponse) error {
req.SettingsBundle.Identifier = getFailsafeIdentifier(req.SettingsBundle.Identifier)
r, err := g.manager.WriteBundle(req.SettingsBundle)
if err != nil {
return err
@@ -51,6 +52,7 @@ func (g Service) ListSettingsBundles(c context.Context, req *proto.ListSettingsB
}
func (g Service) SaveSettingsValue(c context.Context, req *proto.SaveSettingsValueRequest, res *proto.SaveSettingsValueResponse) error {
req.SettingsValue.Identifier = getFailsafeIdentifier(req.SettingsValue.Identifier)
r, err := g.manager.WriteValue(req.SettingsValue)
if err != nil {
return err