mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -8,7 +8,12 @@ import validate from 'uuid-validate';
|
||||
|
||||
export default function applyQuery(collection: string, dbQuery: QueryBuilder, query: Query, schema: SchemaOverview) {
|
||||
if (query.sort) {
|
||||
dbQuery.orderBy(query.sort);
|
||||
dbQuery.orderBy(
|
||||
query.sort.map((sort) => ({
|
||||
...sort,
|
||||
column: `${collection}.${sort.column}`,
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof query.limit === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user