fix: hot fix, replace repoID by repoId

This commit is contained in:
tdurieux
2024-04-26 12:40:56 +01:00
parent a9fefcc970
commit b0fa5e6689
5 changed files with 7 additions and 9 deletions
+2 -2
View File
@@ -331,11 +331,11 @@ angular
current = current[0].child; current = current[0].child;
} }
name = test; name = test;
if (size > 0) { if (size >= 0) {
dir = false; dir = false;
} }
} }
if (size) { if (size != null) {
size = `Size: ${humanFileSize(size || 0)}`; size = `Size: ${humanFileSize(size || 0)}`;
} else { } else {
size = ""; size = "";
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -485,7 +485,7 @@ export default class Repository {
} }
// remove cache // remove cache
await Promise.all([ await Promise.all([
FileModel.deleteMany({ repoID: this.repoId }).exec(), FileModel.deleteMany({ repoId: this.repoId }).exec(),
this.removeCache(), this.removeCache(),
]); ]);
console.log(`[RESET] ${this._model.repoId} has been reset`); console.log(`[RESET] ${this._model.repoId} has been reset`);
+2 -4
View File
@@ -152,9 +152,7 @@ export default class FileSystem extends StorageBase {
try { try {
const stats = await fs.promises.stat(filePath); const stats = await fs.promises.stat(filePath);
if (stats.isDirectory()) { if (stats.isDirectory()) {
output2.push( output2.push(new FileModel({ name: file, path: dir, repoId }));
new FileModel({ name: file, path: dir, repoID: repoId })
);
output2.push( output2.push(
...(await this.listFiles(repoId, join(dir, file), opt)) ...(await this.listFiles(repoId, join(dir, file), opt))
); );
@@ -169,7 +167,7 @@ export default class FileSystem extends StorageBase {
new FileModel({ new FileModel({
name: file, name: file,
path: dir, path: dir,
repoID: repoId, repoId: repoId,
size: stats.size, size: stats.size,
sha: stats.ino.toString(), sha: stats.ino.toString(),
}) })
+1 -1
View File
@@ -272,7 +272,7 @@ export default class S3Storage extends StorageBase {
new FileModel({ new FileModel({
name: basename(f.Key), name: basename(f.Key),
path: dirname(f.Key), path: dirname(f.Key),
repoID: repoId, repoId,
size: f.Size, size: f.Size,
sha: f.ETag, sha: f.ETag,
}) })