diff options
author | jloup <jeanloup.jamet@gmail.com> | 2018-02-24 17:06:57 +0100 |
---|---|---|
committer | jloup <jeanloup.jamet@gmail.com> | 2018-02-24 17:06:57 +0100 |
commit | 989fb5c7dbba174f54f3ae69df788d6685fff46b (patch) | |
tree | da86dec04dfaba81fc5956a262779b89844bb9f6 /cmd/web/js/api.js | |
parent | 2f91f20a8645339385ada602684f4957f20f4da4 (diff) | |
download | Front-989fb5c7dbba174f54f3ae69df788d6685fff46b.tar.gz Front-989fb5c7dbba174f54f3ae69df788d6685fff46b.tar.zst Front-989fb5c7dbba174f54f3ae69df788d6685fff46b.zip |
Upgrade ReactJS. EC6 import modules.
Diffstat (limited to 'cmd/web/js/api.js')
-rw-r--r-- | cmd/web/js/api.js | 12 |
1 files changed, 6 insertions, 6 deletions
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 @@ | |||
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | var App = require('./app.js'); | 3 | import App from './app.js'; |
4 | 4 | ||
5 | var Api = {}; | 5 | var Api = {}; |
6 | 6 | ||
@@ -28,7 +28,7 @@ var ApiEndpoints = { | |||
28 | {'name': 'email', 'mandatory': true, 'inquery': true}, | 28 | {'name': 'email', 'mandatory': true, 'inquery': true}, |
29 | {'name': 'password', 'mandatory': true, 'inquery': true} | 29 | {'name': 'password', 'mandatory': true, 'inquery': true} |
30 | ], | 30 | ], |
31 | 'buildUrl': function(params) { | 31 | 'buildUrl': function() { |
32 | return '/signup'; | 32 | return '/signup'; |
33 | } | 33 | } |
34 | }, | 34 | }, |
@@ -39,7 +39,7 @@ var ApiEndpoints = { | |||
39 | {'name': 'email', 'mandatory': true, 'inquery': true}, | 39 | {'name': 'email', 'mandatory': true, 'inquery': true}, |
40 | {'name': 'password', 'mandatory': true, 'inquery': true} | 40 | {'name': 'password', 'mandatory': true, 'inquery': true} |
41 | ], | 41 | ], |
42 | 'buildUrl': function(params) { | 42 | 'buildUrl': function() { |
43 | return '/signin'; | 43 | return '/signin'; |
44 | } | 44 | } |
45 | }, | 45 | }, |
@@ -80,7 +80,7 @@ var ApiEndpoints = { | |||
80 | 'type': 'GET', | 80 | 'type': 'GET', |
81 | 'auth': true, | 81 | 'auth': true, |
82 | 'parameters': [], | 82 | 'parameters': [], |
83 | 'buildUrl': function(params) { | 83 | 'buildUrl': function() { |
84 | return '/otp/enroll'; | 84 | return '/otp/enroll'; |
85 | } | 85 | } |
86 | }, | 86 | }, |
@@ -90,7 +90,7 @@ var ApiEndpoints = { | |||
90 | 'parameters': [ | 90 | 'parameters': [ |
91 | {'name': 'pass', 'mandatory': true, 'inquery': true}, | 91 | {'name': 'pass', 'mandatory': true, 'inquery': true}, |
92 | ], | 92 | ], |
93 | 'buildUrl': function(params) { | 93 | 'buildUrl': function() { |
94 | return '/otp/validate'; | 94 | return '/otp/validate'; |
95 | } | 95 | } |
96 | }, | 96 | }, |
@@ -183,5 +183,5 @@ Api.DoRequest = function(type, url, params, headers, callback) { | |||
183 | }); | 183 | }); |
184 | }; | 184 | }; |
185 | 185 | ||
186 | module.exports.Api = Api; | 186 | export default Api; |
187 | 187 | ||