fix repository update

This commit is contained in:
tdurieux
2021-04-19 10:31:43 +02:00
parent 7ce61a5502
commit 640665b74e

View File

@@ -57,7 +57,7 @@ router.post("/:repoId/", async (req, res) => {
force: true,
token: req.user.accessToken,
});
if (repoConfig.options.mode == "download") {
if (repoUpdate.options.mode == "download") {
// details.size is in kilobytes
if (details.size > config.MAX_REPO_SIZE) {
return res.status(500).send({ error: "invalid_mode" });
@@ -99,7 +99,7 @@ router.post("/:repoId/", async (req, res) => {
page: repoUpdate.options.page,
},
};
if (repoConfig.options.page) {
if (repoUpdate.options.page) {
data.options.pageSource = details.pageSource;
}
await db.get("anonymized_repositories").updateOne(