Fix: Removed updatedAt from project list (#853)

This commit is contained in:
Ary
2024-04-03 13:35:18 -06:00
committed by GitHub
parent 8b8b3347fb
commit 9f207dd39a
5 changed files with 3 additions and 12 deletions
@@ -67,8 +67,7 @@ export async function handleUploadedFile(filePath: string, name: string) {
*
* @returns {Promise<Array<ProjectFile>>} A promise that resolves to an array of ProjectFile objects,
* each representing a file in the 'uploads' folder with its metadata.
* The metadata includes the filename, creation time (createdAt),
* and last modification time (updatedAt) of each file.
* The metadata includes the filename, creation or overwriting time (updatedAt)
*
* @throws {Error} Throws an error if there is an issue in reading the directory or fetching file statistics.
*/
@@ -83,7 +82,6 @@ export async function getProjectFiles(): Promise<ProjectFile[]> {
projectFiles.push({
filename: removeFileExtension(file),
createdAt: stats.birthtime.toISOString(),
updatedAt: stats.mtime.toISOString(),
});
}
@@ -23,7 +23,6 @@ describe('getProjectFiles test', () => {
const expectedFiles = ['file1', 'file2', 'file3'].map((file) => ({
filename: file,
createdAt: new Date('2020-01-01').toISOString(),
updatedAt: new Date('2021-01-01').toISOString(),
}));