mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
fix: handle possible nil pointer of query (#1407)
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/api/grpc/object"
|
||||
"github.com/caos/zitadel/internal/usergrant/model"
|
||||
auth_pb "github.com/caos/zitadel/pkg/grpc/auth"
|
||||
)
|
||||
|
||||
func ListMyUserGrantsRequestToModel(req *auth_pb.ListMyUserGrantsRequest) *model.UserGrantSearchRequest {
|
||||
offset, limit, asc := object.ListQueryToModel(req.Query)
|
||||
return &model.UserGrantSearchRequest{
|
||||
Offset: req.Query.Offset,
|
||||
Limit: uint64(req.Query.Limit),
|
||||
Asc: req.Query.Asc,
|
||||
Offset: offset,
|
||||
Limit: limit,
|
||||
Asc: asc,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user