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
2 changes: 1 addition & 1 deletion src/sequelize/models/microservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (sequelize, DataTypes) => {
config: {
type: DataTypes.TEXT,
field: 'config',
defaultValue: '',
defaultValue: '{}',
},
name: {
type: DataTypes.TEXT,
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 @@ -503,11 +503,11 @@ async function listVolumeMappings(microserviceUuid, user, isCLI, transaction) {
// this function works with escape and unescape config, in case of unescaped config, the first split will not work,
// but the second will work
function _validateMicroserviceConfig(config) {
if (config === undefined || config === '{}') {
return '{}'
let result
if (config) {
result = config.split('\\"').join('"').split('"').join('\"')
}

return config.split('\\"').join('"').split('"').join('\"')
return result
}

async function _createMicroservice(microserviceData, user, isCLI, transaction) {
Expand Down