add route for QR codes (#7902)

* add route for QR codes

* check that passed ID is a UUID

* add test for qr code redirect

* fix qr code test
This commit is contained in:
Phillip Thelen
2016-08-18 19:37:14 +02:00
committed by Matteo Pagliazzi
parent e68c75c802
commit 7ef2c34177
3 changed files with 51 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ function _requestMaker (user, method, additionalSets = {}) {
let url = `http://localhost:${API_TEST_SERVER_PORT}`;
// 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) {
if (route.indexOf('/email') === 0 || route.indexOf('/export') === 0 || route.indexOf('/paypal') === 0 || route.indexOf('/amazon') === 0 || route.indexOf('/stripe') === 0 || route.indexOf('/qr-code') === 0) {
url += `${route}`;
} else {
url += `/api/${apiVersion}${route}`;