From 989fb5c7dbba174f54f3ae69df788d6685fff46b Mon Sep 17 00:00:00 2001 From: jloup Date: Sat, 24 Feb 2018 17:06:57 +0100 Subject: Upgrade ReactJS. EC6 import modules. --- cmd/web/js/api.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd/web/js/api.js') diff --git a/cmd/web/js/api.js b/cmd/web/js/api.js index 5c19fdf..5cbf5eb 100644 --- a/cmd/web/js/api.js +++ b/cmd/web/js/api.js @@ -1,6 +1,6 @@ 'use strict'; -var App = require('./app.js'); +import App from './app.js'; var Api = {}; @@ -28,7 +28,7 @@ var ApiEndpoints = { {'name': 'email', 'mandatory': true, 'inquery': true}, {'name': 'password', 'mandatory': true, 'inquery': true} ], - 'buildUrl': function(params) { + 'buildUrl': function() { return '/signup'; } }, @@ -39,7 +39,7 @@ var ApiEndpoints = { {'name': 'email', 'mandatory': true, 'inquery': true}, {'name': 'password', 'mandatory': true, 'inquery': true} ], - 'buildUrl': function(params) { + 'buildUrl': function() { return '/signin'; } }, @@ -80,7 +80,7 @@ var ApiEndpoints = { 'type': 'GET', 'auth': true, 'parameters': [], - 'buildUrl': function(params) { + 'buildUrl': function() { return '/otp/enroll'; } }, @@ -90,7 +90,7 @@ var ApiEndpoints = { 'parameters': [ {'name': 'pass', 'mandatory': true, 'inquery': true}, ], - 'buildUrl': function(params) { + 'buildUrl': function() { return '/otp/validate'; } }, @@ -183,5 +183,5 @@ Api.DoRequest = function(type, url, params, headers, callback) { }); }; -module.exports.Api = Api; +export default Api; -- cgit v1.2.3