updating page name and quiz name

This commit is contained in:
2024-09-23 08:35:16 -06:00
parent 158a5d82a2
commit 7af9cab7f0
6 changed files with 122 additions and 42 deletions

View File

@@ -65,4 +65,23 @@ export const pageFileStorageService = {
await fs.unlink(oldFilePath);
}
},
async delete({
courseName,
moduleName,
pageName,
}: {
courseName: string;
moduleName: string;
pageName: string;
}) {
const filePath = path.join(
basePath,
courseName,
moduleName,
"pages",
pageName + ".md"
);
console.log("removing page", filePath);
await fs.unlink(filePath)
}
};