mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 20:21:40 +00:00
refactor: workspace setting definitions
This commit is contained in:
@ -3,6 +3,8 @@ package store
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
storepb "github.com/yourselfhosted/slash/proto/gen/store"
|
||||
)
|
||||
|
||||
@ -50,3 +52,11 @@ func (s *Store) GetWorkspaceSetting(ctx context.Context, find *FindWorkspaceSett
|
||||
s.workspaceSettingCache.Store(workspaceSetting.Key, workspaceSetting)
|
||||
return workspaceSetting, nil
|
||||
}
|
||||
|
||||
func (s *Store) DeleteWorkspaceSetting(ctx context.Context, key storepb.WorkspaceSettingKey) error {
|
||||
if err := s.driver.DeleteWorkspaceSetting(ctx, key); err != nil {
|
||||
return errors.Wrap(err, "failed to delete workspace setting")
|
||||
}
|
||||
s.workspaceSettingCache.Delete(key)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user