chore: update workspace setting store

This commit is contained in:
Steven 2023-09-24 19:31:23 +08:00
parent 96f6fa4257
commit 46fa546a7d
3 changed files with 3 additions and 4 deletions

View File

@ -33,7 +33,7 @@ func NewWorkspaceService(profile *profile.Profile, store *store.Store, licenseSe
func (s *WorkspaceService) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWorkspaceProfileRequest) (*apiv2pb.GetWorkspaceProfileResponse, error) { func (s *WorkspaceService) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWorkspaceProfileRequest) (*apiv2pb.GetWorkspaceProfileResponse, error) {
profile := &apiv2pb.WorkspaceProfile{ profile := &apiv2pb.WorkspaceProfile{
Mode: s.Profile.Mode, Mode: s.Profile.Mode,
Plan: apiv2pb.PlanType_PRO, Plan: apiv2pb.PlanType_FREE,
} }
// Load subscription plan from license service. // Load subscription plan from license service.

View File

@ -39,8 +39,7 @@ func (s *LicenseService) LoadSubscription(ctx context.Context) (*apiv2pb.Subscri
return nil, errors.Wrap(err, "failed to get workspace setting") return nil, errors.Wrap(err, "failed to get workspace setting")
} }
subscription := &apiv2pb.Subscription{ subscription := &apiv2pb.Subscription{
// NOTE: Default to pro plan for now. Plan: apiv2pb.PlanType_FREE,
Plan: apiv2pb.PlanType_PRO,
} }
licenseKey := "" licenseKey := ""
if workspaceSetting != nil { if workspaceSetting != nil {

View File

@ -111,7 +111,7 @@ func (s *Store) ListWorkspaceSettings(ctx context.Context, find *FindWorkspaceSe
} }
workspaceSetting.Value = &storepb.WorkspaceSetting_AutoBackup{AutoBackup: autoBackupSetting} workspaceSetting.Value = &storepb.WorkspaceSetting_AutoBackup{AutoBackup: autoBackupSetting}
} else { } else {
return nil, errors.New("invalid workspace setting key") continue
} }
list = append(list, workspaceSetting) list = append(list, workspaceSetting)
} }