From 10c81c1adcdae34091ce4d6cb6c546f007735480 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 19 Oct 2022 16:57:14 +0100 Subject: [PATCH] Fixing issue with using templates. --- packages/server/src/sdk/app/backups/imports.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/sdk/app/backups/imports.ts b/packages/server/src/sdk/app/backups/imports.ts index b29a9eede5..aaab85ec92 100644 --- a/packages/server/src/sdk/app/backups/imports.ts +++ b/packages/server/src/sdk/app/backups/imports.ts @@ -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")) } }