text: 'use strict';
  const internals = {};
  const Config = require('../../../config');
  
  internals.applyRoutes = function (server, next) {
  
    server.route({
      method: 'GET',
      path: '/dashboard',
      config: {
        auth: {
          strategy: 'session'
        }
      },
      handler: function (request, reply) {
  
        return reply.view('dashboard/index', {
          user: request.auth.credentials.user,
          projectName: Config.get('/projectName'),
          title: 'Dashboard',
          baseUrl: Config.get('/baseUrl')
        });
      }
    });
  
    next();
  };
  
  
  exports.register = function (server, options, next) {
  
    server.dependency(['auth'], internals.applyRoutes);
  
    next();
  };
  
  exports.register.attributes = {
    name: 'dashboard',
    dependencies: 'visionary'
  };
  