Skip to content

Commit

Permalink
Only dump source packages by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 2, 2024
1 parent 22bc6fb commit 39b68b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion routes/repos.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,13 @@ router.get("/:user/api/datasets", function(req, res, next) {
});

router.get("/:user/api/dbdump", function(req, res, next) {
var query = qf({_user: req.params.user}, req.query.all);
var query = {};
if(req.params.user != ":any"){
query._user = req.params.user;
}
if(!req.query.everything){
query._type = 'src'
}
var cursor = packages.find(query, {raw: true});
return cursor.stream().pipe(res.type("application/bson"));
});
Expand Down

0 comments on commit 39b68b6

Please sign in to comment.