mirror of
https://github.com/koodiklinikka/koodiklinikka.fi-api.git
synced 2026-02-09 10:50:46 +00:00
20 lines
431 B
JavaScript
20 lines
431 B
JavaScript
'use strict';
|
||
|
||
var github = require('../services/github');
|
||
var cache = require('apicache').middleware;
|
||
|
||
module.exports = function (app) {
|
||
/*
|
||
* POST /members
|
||
* Endpoint for fetching GitHub org public members
|
||
*/
|
||
|
||
app.get('/members', cache('3 hours'), function(req, res, next) {
|
||
github.getMembers().then(function(data) {
|
||
res.status(200).send(data);
|
||
}, function(error) {
|
||
next(error);
|
||
});
|
||
});
|
||
};
|