Removed unsupported SortDirs
MODIFY
src/assets/server/rest/v1/docs/open-api-standard.json
src/assets/server/rest/v1/docs/open-api-standard.json
},
{
"$ref": "#/components/parameters/SortFields"
- },
- {
- "$ref": "#/components/parameters/SortDirs"
}
],
"tags": [
"schema": {
"type": "string"
}
- },
- "SortDirs": {
- "in": "query",
- "name": "SortDirs",
- "description": "Sorted directions",
- "required": false,
- "example": "asc",
- "schema": {
- "type": "string",
- "enum": [
- "asc",
- "desc"
- ]
- }
}
}
}

MODIFY
src/types/requests/HttpDatabaseRequest.ts
src/types/requests/HttpDatabaseRequest.ts
@@ -3,6 +3,6 @@ export default interface HttpDatabaseRequest {
Limit: number;
OnlyRecordCount?: boolean;
SortFields: string[];
- SortDirs: string[];
+ SortDirs: string[]; // TODO: Deprecated: remote it
Sort: any;
}

MODIFY
test/api/client/utils/CrudApi.ts
test/api/client/utils/CrudApi.ts
@@ -151,14 +151,9 @@ export default class CrudApi {
private _buildOrdering(ordering, queryString): void {
// Check
if (ordering && ordering.length) {
- if (!queryString.SortFields) {
- queryString.SortFields = [];
- queryString.SortDirs = [];
- }
// Set
ordering.forEach((order) => {
queryString.SortFields.push(order.field);
- queryString.SortDirs.push(order.direction);
});
}
}

Removed unsupported SortDirs