GCSBOSS/api-joe

View on GitHub
lib/api.js

Summary

Maintainability
A
0 mins
Test Coverage
const Session = require('./session');
const Proxy = require('./proxy');
const { installServices, routeRequest } = require('./services');

module.exports = function({ post, all }){

    installServices(this);

    post('/login', Session.create);
    post('/logout', Session.match, Session.destroy);

    all(routeRequest, Session.match, Proxy.pass);
}