chore: remove all reference to originalFiles

This commit is contained in:
tdurieux
2024-04-27 18:04:51 +01:00
parent 3d3a03fd04
commit 17cb1f294f
4 changed files with 10 additions and 32 deletions
+4 -7
View File
@@ -152,13 +152,10 @@ router.get("/repos", async (req, res) => {
}
const skipIndex = (page - 1) * limit;
const [total, results] = await Promise.all([
AnonymizedRepositoryModel.find(
{
$and: query,
},
{ originalFiles: 0 }
).countDocuments(),
AnonymizedRepositoryModel.find({ $and: query }, { originalFiles: 0 })
AnonymizedRepositoryModel.find({
$and: query,
}).countDocuments(),
AnonymizedRepositoryModel.find({ $and: query })
.skip(skipIndex)
.sort(sort)
.limit(limit)
+1 -1
View File
@@ -480,7 +480,7 @@ router.post("/", async (req: express.Request, res: express.Response) => {
try {
try {
await db.getRepository(repoUpdate.repoId, { includeFiles: false });
await db.getRepository(repoUpdate.repoId);
throw new AnonymousError("repoId_already_used", {
httpStatus: 400,
object: repoUpdate,