v3: misc fixes

This commit is contained in:
Matteo Pagliazzi
2016-05-15 15:10:41 +02:00
parent 3fbc156811
commit 0be5d1da9c
9 changed files with 42 additions and 37 deletions

View File

@@ -32,8 +32,8 @@ function _requestMaker (user, method, additionalSets = {}) {
return new Promise((resolve, reject) => {
let url = `http://localhost:${API_TEST_SERVER_PORT}`;
// do not prefix with api/apiVersion requests to top level routes like dataexport and payments
if (route.indexOf('/export') === 0 || route.indexOf('/paypal') === 0 || route.indexOf('/amazon') === 0 || route.indexOf('/stripe') === 0) {
// do not prefix with api/apiVersion requests to top level routes like dataexport, payments and emails
if (route.indexOf('/email') === 0 || route.indexOf('/export') === 0 || route.indexOf('/paypal') === 0 || route.indexOf('/amazon') === 0 || route.indexOf('/stripe') === 0) {
url += `${route}`;
} else {
url += `/api/${apiVersion}${route}`;