From 6f4e252246c715a1dafc1e236c8074b08cdd12a3 Mon Sep 17 00:00:00 2001
From: Chocobozzz <florian.bigard@gmail.com>
Date: Mon, 7 Mar 2016 14:48:46 +0100
Subject: Prepare Angular routes

---
 server/controllers/index.js |  4 +---
 server/controllers/views.js | 27 ---------------------------
 2 files changed, 1 insertion(+), 30 deletions(-)
 delete mode 100644 server/controllers/views.js

(limited to 'server/controllers')

diff --git a/server/controllers/index.js b/server/controllers/index.js
index 858f493da..7b0288dbb 100644
--- a/server/controllers/index.js
+++ b/server/controllers/index.js
@@ -3,9 +3,7 @@
 var constants = require('../initializers/constants')
 
 var apiController = require('./api/' + constants.API_VERSION)
-var viewsController = require('./views')
 
 module.exports = {
-  api: apiController,
-  views: viewsController
+  api: apiController
 }
diff --git a/server/controllers/views.js b/server/controllers/views.js
deleted file mode 100644
index aa9718079..000000000
--- a/server/controllers/views.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-
-var express = require('express')
-
-var cacheMiddleware = require('../middlewares').cache
-
-var router = express.Router()
-
-router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex)
-router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial)
-
-// ---------------------------------------------------------------------------
-
-module.exports = router
-
-// ---------------------------------------------------------------------------
-
-function getIndex (req, res) {
-  res.render('index')
-}
-
-function getPartial (req, res) {
-  var directory = req.params.directory
-  var name = req.params.name
-
-  res.render('partials/' + directory + '/' + name)
-}
-- 
cgit v1.2.3