Skip to content

Commit

Permalink
add condastatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Mar 5, 2025
1 parent a45f004 commit a321495
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions routes/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ router.get('/shared/cranstatus/:package', function(req, res, next) {
});
});

router.get('/shared/condastatus/:package', function(req, res, next) {
return fetch(`https://api.anaconda.org/package/conda-forge/r-${req.params.package}`).then(function(response){
if (!response.ok) {
throw "Failed to find package metadata on conda-forge";
}
return response.json().then(function(conda){
return res.set('Cache-Control', 'max-age=3600, public').send({
name: conda.full_name, url: conda.html_url, version: conda.latest_version
});
});
});
});

router.get('/shared/webrstatus', function(req, res, next) {
const promise = new session.Shelter();
return promise.then(function(shelter){
Expand Down

0 comments on commit a321495

Please sign in to comment.