mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-21 03:48:06 +00:00
fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based
added ListOrganizations() tests incompletel
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/domain"
|
||||
"github.com/zitadel/zitadel/internal/query"
|
||||
object "github.com/zitadel/zitadel/pkg/grpc/object/v2beta"
|
||||
// object_pb "github.com/zitadel/zitadel/pkg/grpc/org/v2beta"
|
||||
)
|
||||
|
||||
func DomainToDetailsPb(objectDetail *domain.ObjectDetails) *object.Details {
|
||||
@@ -34,6 +35,7 @@ func ToListDetails(response query.SearchResponse) *object.ListDetails {
|
||||
|
||||
return details
|
||||
}
|
||||
|
||||
func ListQueryToQuery(query *object.ListQuery) (offset, limit uint64, asc bool) {
|
||||
if query == nil {
|
||||
return 0, 0, false
|
||||
@@ -73,3 +75,10 @@ func TextMethodToQuery(method object.TextQueryMethod) query.TextComparison {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
func ListQueryToModel(query *object.ListQuery) (offset, limit uint64, asc bool) {
|
||||
if query == nil {
|
||||
return 0, 0, false
|
||||
}
|
||||
return query.Offset, uint64(query.Limit), query.Asc
|
||||
}
|
||||
|
Reference in New Issue
Block a user