diff options
author | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-05-05 11:01:44 +0200 |
---|---|---|
committer | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-05-05 11:01:44 +0200 |
commit | f486ab15c64375a2c97df979a718929420124cd6 (patch) | |
tree | b5fcfbbe4c48e438e2c50129ca60dd0fc1ecfb91 /cds-ui/server/src/controllers | |
parent | 6b6ac70007ba2b52c6beb8c0d22453a628c891f3 (diff) |
fix sort at package list
Issue-ID: CCSDK-2320
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: Ia91d519c315b6ef0c01089422253599b137eceec
Diffstat (limited to 'cds-ui/server/src/controllers')
-rw-r--r-- | cds-ui/server/src/controllers/blueprint-rest.controller.ts | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts index 7b2c78329..2319e0a5e 100644 --- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts +++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts @@ -20,34 +20,14 @@ limitations under the License. */ -import { - Count, - CountSchema, - Filter, - repository, - Where, -} from '@loopback/repository'; -import { - post, - param, - get, - getFilterSchemaFor, - getWhereSchemaFor, - patch, - put, - del, - requestBody, - Request, - Response, - RestBindings, -} from '@loopback/rest'; +import {get, param, post, Request, requestBody, Response, RestBindings} from '@loopback/rest'; import {Blueprint} from '../models'; import {inject} from '@loopback/core'; import {BlueprintService} from '../services'; import * as fs from 'fs'; import * as multiparty from 'multiparty'; import * as request_lib from 'request'; -import {processorApiConfig, appConfig} from '../config/app-config'; +import {appConfig, processorApiConfig} from '../config/app-config'; import {bluePrintManagementServiceGrpcClient} from '../clients/blueprint-management-service-grpc-client'; import {BlueprintDetail} from '../models/blueprint.detail.model'; @@ -94,8 +74,9 @@ export class BlueprintRestController { async getPagedBlueprints( @param.query.number('limit') limit: number, @param.query.number('offset') offset: number, - @param.query.string('sort') sort: string) { - return await this.bpservice.getPagedBueprints(limit, offset, sort); + @param.query.string('sort') sort: string, + @param.query.string('sortType') sortType: string) { + return await this.bpservice.getPagedBueprints(limit, offset, sort, sortType); } @get('/controllerblueprint/metadata/paged/{keyword}', { @@ -110,8 +91,9 @@ export class BlueprintRestController { @param.path.string('keyword') keyword: string, @param.query.number('limit') limit: number, @param.query.number('offset') offset: number, - @param.query.string('sort') sort: string) { - return await this.bpservice.getMetaDataPagedBlueprints(limit, offset, sort, keyword); + @param.query.string('sort') sort: string, + @param.query.string('sortType') sortType: string) { + return await this.bpservice.getMetaDataPagedBlueprints(limit, offset, sort, keyword, sortType); } @get('/controllerblueprint/meta-data/{keyword}', { |