Fixing issue with using templates.

This commit is contained in:
mike12345567 2022-10-19 16:57:14 +01:00
parent 113a23ba3d
commit 10c81c1adc
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {
uploadDirectory,
upload,
} from "../../../utilities/fileSystem/utilities"
import { downloadTemplate } from "../../../utilities/fileSystem"
import { ObjectStoreBuckets, FieldTypes } from "../../../constants"
import { join } from "path"
import fs from "fs"
@ -89,7 +90,7 @@ async function getTemplateStream(template: TemplateType) {
return fs.createReadStream(template.file.path)
} else if (template.key) {
const [type, name] = template.key.split("/")
const tmpPath = await exports.downloadTemplate(type, name)
const tmpPath = await downloadTemplate(type, name)
return fs.createReadStream(join(tmpPath, name, "db", "dump.txt"))
}
}