mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 14:01:24 +00:00
chore: update workspace setting store
This commit is contained in:
parent
96f6fa4257
commit
46fa546a7d
@ -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.
|
||||||
|
@ -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 {
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user