Browse Source

Fixing issue with applications not being created due to a lack of template file.

pull/1293/head
mike12345567 5 years ago
parent
commit
bc18959f87
  1. 9
      packages/server/src/api/controllers/application.js

9
packages/server/src/api/controllers/application.js

@ -162,11 +162,14 @@ exports.fetchAppPackage = async function(ctx) {
exports.create = async function(ctx) {
const { useTemplate, templateKey } = ctx.request.body
const instance = await createInstance({
const instanceConfig = {
useTemplate,
key: templateKey,
file: ctx.request.files.templateFile,
})
}
if (ctx.request.files && ctx.request.files.templateFile) {
instanceConfig.file = ctx.request.files.templateFile
}
const instance = await createInstance(instanceConfig)
const url = await getAppUrlIfNotInUse(ctx)
const appId = instance._id

Loading…
Cancel
Save