fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based

added ListOrganizations() tests incompletel
This commit is contained in:
Iraq Jaber
2025-04-29 13:43:37 +02:00
parent 6d73b8e3ad
commit 0121478b93
5 changed files with 339 additions and 21 deletions

View File

@@ -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
}