mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
@@ -14,11 +14,11 @@ const getTemplateNameList = () => {
|
||||
);
|
||||
const templatesPath = path.join(path.dirname(filePath), 'src');
|
||||
|
||||
return fs.readdirSync(templatesPath) as string[];
|
||||
return fs.promises.readdir(templatesPath);
|
||||
};
|
||||
|
||||
const getFileTemplates = async (): Promise<AppTemplateSchemaType[]> => {
|
||||
const templateNames = getTemplateNameList();
|
||||
const templateNames = await getTemplateNameList();
|
||||
|
||||
return Promise.all(
|
||||
templateNames.map<Promise<AppTemplateSchemaType>>(async (name) => {
|
||||
|
Reference in New Issue
Block a user