openmrs/openmrs-contrib-id

View on GitHub
app/routes/main.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict';
/**
 * homopage for logged-in users
 */

// LOGIN-LOGOUT
exports = module.exports = (req, res, next) => {
  if (!req.session.user) { // only shown to users logged in
    return next();
  }

  res.render('views/root');
};