Merge pull request #221 from eordano/fix/enablePlugin

only add routes for email store if plugin enabled
This commit is contained in:
Matias Alejo Garcia 2014-10-30 22:49:28 -03:00
commit 92a868bc21

View File

@ -52,11 +52,13 @@ module.exports = function(app) {
app.get(apiPrefix + '/currency', currency.index);
// Email store plugin
var emailPlugin = require('../plugins/emailstore');
app.post(apiPrefix + '/email/register', emailPlugin.post);
app.post(apiPrefix + '/email/validate', emailPlugin.validate);
app.get(apiPrefix + '/email/retrieve/:email', emailPlugin.get);
app.get(apiPrefix + '/email/validate', emailPlugin.validate);
if (config.enableEmailstore) {
var emailPlugin = require('../plugins/emailstore');
app.post(apiPrefix + '/email/register', emailPlugin.post);
app.post(apiPrefix + '/email/validate', emailPlugin.validate);
app.get(apiPrefix + '/email/retrieve/:email', emailPlugin.get);
app.get(apiPrefix + '/email/validate', emailPlugin.validate);
}
//Home route
var index = require('../app/controllers/index');