mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: retire unused workspace settings
This commit is contained in:
@@ -18,6 +18,10 @@ type FindWorkspaceSetting struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
type DeleteWorkspaceSetting struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func (s *Store) UpsertWorkspaceSetting(ctx context.Context, upsert *WorkspaceSetting) (*WorkspaceSetting, error) {
|
||||
return s.driver.UpsertWorkspaceSetting(ctx, upsert)
|
||||
}
|
||||
@@ -55,6 +59,15 @@ func (s *Store) GetWorkspaceSetting(ctx context.Context, find *FindWorkspaceSett
|
||||
return systemSettingMessage, nil
|
||||
}
|
||||
|
||||
func (s *Store) DeleteWorkspaceSetting(ctx context.Context, delete *DeleteWorkspaceSetting) error {
|
||||
err := s.driver.DeleteWorkspaceSetting(ctx, delete)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed to delete workspace setting")
|
||||
}
|
||||
s.workspaceSettingCache.Delete(delete.Name)
|
||||
return nil
|
||||
}
|
||||
|
||||
type FindWorkspaceSettingV1 struct {
|
||||
Key storepb.WorkspaceSettingKey
|
||||
}
|
||||
|
Reference in New Issue
Block a user