fix: user grant by id (#6242)

This commit is contained in:
Livio Spring 2023-07-21 13:04:55 +02:00 committed by GitHub
parent cfb8f3c07f
commit cd5e176e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import (
)
func (s *Server) GetUserGrantByID(ctx context.Context, req *mgmt_pb.GetUserGrantByIDRequest) (*mgmt_pb.GetUserGrantByIDResponse, error) {
idQuery, err := query.NewUserGrantGrantIDSearchQuery(req.GrantId)
idQuery, err := query.NewUserGrantIDSearchQuery(req.GrantId)
if err != nil {
return nil, err
}

View File

@ -93,6 +93,10 @@ func NewUserGrantGrantIDSearchQuery(id string) (SearchQuery, error) {
return NewTextQuery(UserGrantGrantID, id, TextEquals)
}
func NewUserGrantIDSearchQuery(id string) (SearchQuery, error) {
return NewTextQuery(UserGrantID, id, TextEquals)
}
func NewUserGrantUserTypeQuery(typ domain.UserType) (SearchQuery, error) {
return NewNumberQuery(UserTypeCol, typ, NumberEquals)
}