Skip to content

Commit

Permalink
Fix TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
atburke committed Aug 14, 2024
1 parent 171ff86 commit ddfd4f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/auth/statichostuser/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (s *Service) ListStaticHostUsers(ctx context.Context, req *userprovisioning
return nil, trace.Wrap(err)
}

// TODO(atburke): Switch to using the cache after static host users have been added to the cache.
users, nextToken, err := s.backend.ListStaticHostUsers(ctx, int(req.PageSize), req.PageToken)
if err != nil {
return nil, trace.Wrap(err)
Expand All @@ -99,6 +100,7 @@ func (s *Service) GetStaticHostUser(ctx context.Context, req *userprovisioningpb
return nil, trace.Wrap(err)
}

// TODO(atburke): Switch to using the cache after static host users have been added to the cache.
out, err := s.backend.GetStaticHostUser(ctx, req.Name)
return out, trace.Wrap(err)
}
Expand Down
2 changes: 0 additions & 2 deletions lib/services/local/statichostuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func NewStaticHostUserService(bk backend.Backend) (*StaticHostUserService, error

// ListStaticHostUsers lists static host users.
func (s *StaticHostUserService) ListStaticHostUsers(ctx context.Context, pageSize int, pageToken string) ([]*userprovisioningpb.StaticHostUser, string, error) {
// TODO(atburke): use cache
out, nextToken, err := s.svc.ListResources(ctx, pageSize, pageToken)
if err != nil {
return nil, "", trace.Wrap(err)
Expand All @@ -68,7 +67,6 @@ func (s *StaticHostUserService) ListStaticHostUsers(ctx context.Context, pageSiz

// GetStaticHostUser returns a static host user by name.
func (s *StaticHostUserService) GetStaticHostUser(ctx context.Context, name string) (*userprovisioningpb.StaticHostUser, error) {
// TODO(atburke): use cache
out, err := s.svc.GetResource(ctx, name)
return out, trace.Wrap(err)
}
Expand Down

0 comments on commit ddfd4f3

Please sign in to comment.