mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
Fix: Removed updatedAt from project list (#853)
This commit is contained in:
@@ -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(),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user