Skip to content

Commit

Permalink
Simple dump api
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 2, 2024
1 parent 376cdc8 commit fdaadb6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routes/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ router.get('/shared/mongostatus', function(req, res, next) {
});
});

router.get('/shared/dbdump', function(req, res, next) {
var cursor = packages.find({}, {raw: true});
return cursor.stream().pipe(res.type("application/bson"));
});

function find_cran_package(pkgname, type = 'src'){
var pkgname = pkgname.toLowerCase();
return packages.findOne({_nocasepkg : pkgname, _type : type, _user : 'cran'}).then(function(x){
Expand Down

0 comments on commit fdaadb6

Please sign in to comment.