fix incremental

This commit is contained in:
tdurieux
2026-05-06 17:12:58 +03:00
parent 804bbffb7a
commit 3b27816702
+7 -1
View File
@@ -397,7 +397,13 @@ export default class Repository {
this._model.lastView = new Date();
this._model.pageView = (this._model.pageView || 0) + 1;
if (!isConnected) return this.model;
await this._model.save();
await AnonymizedRepositoryModel.updateOne(
{ _id: this._model._id },
{
$set: { lastView: this._model.lastView },
$inc: { pageView: 1 },
}
).exec();
}
/**