Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions specs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1601,9 +1601,7 @@ paths:
'200':
description: Success
schema:
type: array
items:
$ref: '#/definitions/VolumeMappingRequest'
$ref: '#/definitions/VolumeMappingResponse'
headers:
X-Timestamp:
type: number
Expand Down Expand Up @@ -2776,6 +2774,13 @@ definitions:
accessMode:
type: string
example: rw
VolumeMappingResponse:
type: object
properties:
volumeMappings:
type: array
items:
$ref: '#/definitions/VolumeMappingRequest'
VolumeMappingRequest:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions src/cli/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ async function _deleteConnector(obj) {
}
}

async function _getConnectorList(obj) {
async function _getConnectorList() {
const list = await ConnectorService.getConnectorList();
logger.info(JSON.stringify(list, null, 2));
logger.info('Connector list has been gotten successfully');
Expand All @@ -167,7 +167,7 @@ function _createConnectorObject(cliData) {
domain: cliData.domain,
publicIp: cliData.publicIp,
cert: cliData.cert,
isSelfSignedCert: AppHelper.validateBooleanCliOptions(cliData.selfSignedEnable, cliData.selfSignedDisable),
isSelfSignedCert: AppHelper.validateBooleanCliOptions(cliData.selfSignedOn, cliData.selfSignedOff),
devMode: AppHelper.validateBooleanCliOptions(cliData.devModeOn, cliData.devModeOff)
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/connector-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function _createConnector(connectorData, transaction) {
if (connector) {
throw new Errors.ValidationError(ErrorMessages.ALREADY_EXISTS)
}
await ConnectorManager.create(connectorData, transaction)
return await ConnectorManager.create(connectorData, transaction)
}

async function _updateConnector(connectorData, transaction) {
Expand Down
8 changes: 4 additions & 4 deletions src/services/microservices-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ const _deleteMicroservice = async function (microserviceUuid, microserviceData,


const microservice = await MicroserviceManager.findOneWithStatus(where, transaction);
if (!microservice) {
throw new Errors.NotFoundError(AppHelper.formatMessage(ErrorMessages.INVALID_MICROSERVICE_UUID, microserviceUuid));
}

if (microservice.microserviceStatus.status === MicroserviceStates.NOT_RUNNING) {
const affectedRows = await MicroserviceManager.delete({
await MicroserviceManager.delete({
uuid: microserviceUuid
}, transaction);
if (affectedRows === 0) {
throw new Errors.NotFoundError(AppHelper.formatMessage(ErrorMessages.INVALID_MICROSERVICE_UUID, microserviceUuid));
}
} else {
await MicroserviceManager.update({
uuid: microserviceUuid
Expand Down
22 changes: 8 additions & 14 deletions tests/Controller Testing.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3829,11 +3829,12 @@
{
"listen": "test",
"script": {
"id": "4f7a9f52-12cc-49d0-9e2f-147b6f5cb6fa",
"id": "6d078bca-3762-400b-bf9f-2701f7f5b01b",
"type": "text/javascript",
"exec": [
"tests[\"Status code is 204\"] = responseCode.code === 204;"
],
"type": "text/javascript"
"tests[\"Status code is 204\"] = responseCode.code === 204;",
""
]
}
}
],
Expand All @@ -3846,16 +3847,15 @@
},
{
"key": "Authorization",
"value": "{{user-token}}",
"type": "text"
"value": "{{user-token}}"
}
],
"body": {
"mode": "raw",
"raw": ""
"raw": "{\n\t\"withCleanup\": false\n}"
},
"url": {
"raw": "{{host}}/api/v3/microservices/{{ms-id}}?withCleanUp=true",
"raw": "{{host}}/api/v3/microservices/{{ms-id}}",
"host": [
"{{host}}"
],
Expand All @@ -3864,12 +3864,6 @@
"v3",
"microservices",
"{{ms-id}}"
],
"query": [
{
"key": "withCleanUp",
"value": "true"
}
]
}
},
Expand Down