diff --git a/packages/server/src/api/controllers/instance.js b/packages/server/src/api/controllers/instance.js index ba03c6c352..573860438c 100644 --- a/packages/server/src/api/controllers/instance.js +++ b/packages/server/src/api/controllers/instance.js @@ -5,7 +5,8 @@ const env = require("../../environment") exports.create = async function(ctx) { const instanceName = ctx.request.body.name - const instanceId = `inst_${ctx.params.applicationId.substring(0, 7)}_${newid()}` + const appShortId = ctx.params.applicationId.substring(0, 7) + const instanceId = `inst_${appShortId}_${newid()}` const { applicationId } = ctx.params const clientId = env.CLIENT_ID const db = new CouchDB(instanceId)