mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-08 12:24:52 +02:00
chore: remove all reference to originalFiles
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user