This commit is contained in:
Michael Shanks 2020-05-18 16:33:41 +01:00
parent 9394a74dcd
commit 1b30903940
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ const env = require("../../environment")
exports.create = async function(ctx) { exports.create = async function(ctx) {
const instanceName = ctx.request.body.name 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 { applicationId } = ctx.params
const clientId = env.CLIENT_ID const clientId = env.CLIENT_ID
const db = new CouchDB(instanceId) const db = new CouchDB(instanceId)