colonizers/colonizers

View on GitHub
packages/colonizers/server/web/index.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict';

exports.register = function(server, options, next) {
  server.route({
    method: 'GET',
    path: '/',
    config: {
      auth: false
    },
    handler: function(request, reply) {
      if (request.auth.isAuthenticated) {
        return reply.redirect('/lobby');
      }

      reply.redirect('/login');
    }
  });

  next();
};

exports.register.attributes = {
  name: 'web/index'
};