This commit is contained in:
Adria Navarro 2024-10-22 16:19:25 +02:00
parent e1640cccf9
commit b85a28fdf6
1 changed files with 2 additions and 2 deletions

View File

@ -440,13 +440,13 @@ async function creationEvents(request: BBRequest<CreateAppRequest>, app: App) {
let creationFns: ((app: App) => Promise<void>)[] = [] let creationFns: ((app: App) => Promise<void>)[] = []
const { useTemplate, templateKey, file } = request.body const { useTemplate, templateKey, file } = request.body
if (useTemplate) { if (useTemplate === "true") {
// from template // from template
if (templateKey && templateKey !== "undefined") { if (templateKey && templateKey !== "undefined") {
creationFns.push(a => events.app.templateImported(a, templateKey)) creationFns.push(a => events.app.templateImported(a, templateKey))
} }
// from file // from file
else if (request.files?.templateFile) { else if (request.files?.fileToImport) {
creationFns.push(a => events.app.fileImported(a)) creationFns.push(a => events.app.fileImported(a))
} }
// from server file path // from server file path