mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
fix: hot fix, replace repoID by repoId
This commit is contained in:
@@ -485,7 +485,7 @@ export default class Repository {
|
||||
}
|
||||
// remove cache
|
||||
await Promise.all([
|
||||
FileModel.deleteMany({ repoID: this.repoId }).exec(),
|
||||
FileModel.deleteMany({ repoId: this.repoId }).exec(),
|
||||
this.removeCache(),
|
||||
]);
|
||||
console.log(`[RESET] ${this._model.repoId} has been reset`);
|
||||
|
||||
@@ -152,9 +152,7 @@ export default class FileSystem extends StorageBase {
|
||||
try {
|
||||
const stats = await fs.promises.stat(filePath);
|
||||
if (stats.isDirectory()) {
|
||||
output2.push(
|
||||
new FileModel({ name: file, path: dir, repoID: repoId })
|
||||
);
|
||||
output2.push(new FileModel({ name: file, path: dir, repoId }));
|
||||
output2.push(
|
||||
...(await this.listFiles(repoId, join(dir, file), opt))
|
||||
);
|
||||
@@ -169,7 +167,7 @@ export default class FileSystem extends StorageBase {
|
||||
new FileModel({
|
||||
name: file,
|
||||
path: dir,
|
||||
repoID: repoId,
|
||||
repoId: repoId,
|
||||
size: stats.size,
|
||||
sha: stats.ino.toString(),
|
||||
})
|
||||
|
||||
@@ -272,7 +272,7 @@ export default class S3Storage extends StorageBase {
|
||||
new FileModel({
|
||||
name: basename(f.Key),
|
||||
path: dirname(f.Key),
|
||||
repoID: repoId,
|
||||
repoId,
|
||||
size: f.Size,
|
||||
sha: f.ETag,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user