Deprecate API v2 (was Revert "Revert "Deprecate API v2"") (#7802)

* Revert "Revert "Deprecate API v2""

* fix path in shops controller
This commit is contained in:
Matteo Pagliazzi
2016-08-01 22:36:10 +02:00
committed by GitHub
parent 2a3e3fb9d3
commit 60f34dafb0
194 changed files with 231 additions and 11488 deletions

View File

@@ -23,12 +23,12 @@ import mongoose from 'mongoose';
// Load nconf for unit tests
//------------------------------
if (process.env.LOAD_SERVER === '0') { // when the server is in a different process we simply connect to mongoose
require('../../website/server/libs/api-v3/setupNconf')('./config.json');
require('../../website/server/libs/setupNconf')('./config.json');
// Use Q promises instead of mpromise in mongoose
mongoose.Promise = Bluebird;
mongoose.connect(nconf.get('TEST_DB_URI'));
} else { // When running tests and the server in the same process
require('../../website/server/libs/api-v3/setupNconf')('./config.json.example');
require('../../website/server/libs/setupNconf')('./config.json.example');
nconf.set('NODE_DB_URI', nconf.get('TEST_DB_URI'));
nconf.set('NODE_ENV', 'test');
nconf.set('IS_TEST', true);