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 344655c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions routes/repos.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ router.get("/:user/api/datasets", function(req, res, next) {
return send_results(cursor, req, res, next);
});

router.get("/:user/api/rawdb", function(req, res, next) {
var query = qf({_user: user}, req.query.all);
var cursor = packages.find(query, {raw: true});
return cursor.stream().pipe(res.type("application/bson"));
});

router.get("/:user/stats/vignettes", function(req, res, next) {
var limit = parseInt(req.query.limit) || 200;
var cursor = packages.aggregate([
Expand Down Expand Up @@ -575,6 +581,8 @@ router.get("/:user/stats/datasets", function(req, res, next) {
});
});



/* Public aggregated data (these support :any users)*/
router.get('/:user/stats/descriptions', function(req, res, next) {
var user = req.params.user;
Expand Down

0 comments on commit 344655c

Please sign in to comment.