From e643d6651fbc1076f886fd48fdc1d6a3bf251090 Mon Sep 17 00:00:00 2001 From: Victoria Sloan Date: Mon, 22 Jun 2020 17:38:00 +0100 Subject: [PATCH] setting appId on user object when creating the app instance --- packages/cli/src/commands/new/newHandler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/new/newHandler.js b/packages/cli/src/commands/new/newHandler.js index 44007acde7..c0d8b4be50 100644 --- a/packages/cli/src/commands/new/newHandler.js +++ b/packages/cli/src/commands/new/newHandler.js @@ -18,7 +18,7 @@ const run = async opts => { console.log(chalk.green(`Budibase app ${opts.name} created!`)) } catch (error) { console.error( - chalk.red("Error creating new app", JSON.stringify(error, { space: 2 })) + chalk.red("Error creating new app", error) ) } } @@ -52,8 +52,10 @@ const createAppInstance = async opts => { const instanceController = require("@budibase/server/src/api/controllers/instance") const createInstCtx = { params: { - clientId: process.env.CLIENT_ID, - applicationId: opts.applicationId, + clientId: process.env.CLIENT_ID + }, + user: { + appId: opts.applicationId }, request: { body: { name: `dev-${process.env.CLIENT_ID}` },