fix: changes (#1482)

* fix: changes

* change listquery to changequery

* fix: changes in auth

Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
Livio Amstutz
2021-03-29 10:32:23 +02:00
committed by GitHub
parent 0a058a821e
commit 48456b84b9
12 changed files with 54 additions and 38 deletions

View File

@@ -23,12 +23,12 @@ func (s *Server) GetMyUser(ctx context.Context, _ *auth_pb.GetMyUserRequest) (*a
}
func (s *Server) ListMyUserChanges(ctx context.Context, req *auth_pb.ListMyUserChangesRequest) (*auth_pb.ListMyUserChangesResponse, error) {
offset, limit, asc := object.ListQueryToModel(req.Query)
sequence, limit, asc := change.ChangeQueryToModel(req.Query)
features, err := s.repo.GetOrgFeatures(ctx, authz.GetCtxData(ctx).ResourceOwner)
if err != nil {
return nil, err
}
changes, err := s.repo.MyUserChanges(ctx, offset, limit, asc, features.AuditLogRetention)
changes, err := s.repo.MyUserChanges(ctx, sequence, limit, asc, features.AuditLogRetention)
if err != nil {
return nil, err
}