Merge branch 'dev' of github.com:rede5/gohorsejobs into dev
This commit is contained in:
commit
939df51412
1 changed files with 4 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/rede5/gohorsejobs/backend/internal/core/dto"
|
"github.com/rede5/gohorsejobs/backend/internal/core/dto"
|
||||||
"github.com/rede5/gohorsejobs/backend/internal/core/ports"
|
"github.com/rede5/gohorsejobs/backend/internal/core/ports"
|
||||||
|
apidto "github.com/rede5/gohorsejobs/backend/internal/dto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ListUsersUseCase struct {
|
type ListUsersUseCase struct {
|
||||||
|
|
@ -17,7 +18,7 @@ func NewListUsersUseCase(uRepo ports.UserRepository) *ListUsersUseCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (uc *ListUsersUseCase) Execute(ctx context.Context, tenantID string, page, limit int) (*dto.PaginatedResponse, error) {
|
func (uc *ListUsersUseCase) Execute(ctx context.Context, tenantID string, page, limit int) (*apidto.PaginatedResponse, error) {
|
||||||
if page <= 0 {
|
if page <= 0 {
|
||||||
page = 1
|
page = 1
|
||||||
}
|
}
|
||||||
|
|
@ -54,9 +55,9 @@ func (uc *ListUsersUseCase) Execute(ctx context.Context, tenantID string, page,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return &dto.PaginatedResponse{
|
return &apidto.PaginatedResponse{
|
||||||
Data: response,
|
Data: response,
|
||||||
Pagination: dto.Pagination{
|
Pagination: apidto.Pagination{
|
||||||
Page: page,
|
Page: page,
|
||||||
Limit: limit,
|
Limit: limit,
|
||||||
Total: total,
|
Total: total,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue