UPDATE: Something with module search
All checks were successful
Build and Release / release (push) Successful in 1m25s

This commit is contained in:
2026-04-07 17:45:39 +07:00
parent 2d36004ac7
commit 677ae95c8f
11 changed files with 177 additions and 248 deletions

View File

@@ -115,6 +115,18 @@ func (m *mediaService) SearchMedia(ctx context.Context, dto *request.SearchMedia
arg := sqlc.SearchMediasParams{
Limit: int32(dto.Limit + 1),
}
if dto.Sort != "" {
arg.Sort = pgtype.Text{String: dto.Sort, Valid: true}
} else {
arg.Sort = pgtype.Text{String: "id", Valid: true}
}
if dto.Order != "" {
arg.Order = pgtype.Text{String: dto.Order, Valid: true}
} else {
arg.Order = pgtype.Text{String: "asc", Valid: true}
}
if dto.Cursor != "" {
pgID, err := convert.StringToUUID(dto.Cursor)