diff options
Diffstat (limited to 'app/Controllers/Http/UserController.js')
-rw-r--r-- | app/Controllers/Http/UserController.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Controllers/Http/UserController.js b/app/Controllers/Http/UserController.js index 99336cb..aef7f01 100644 --- a/app/Controllers/Http/UserController.js +++ b/app/Controllers/Http/UserController.js | |||
@@ -10,11 +10,12 @@ const fetch = require('node-fetch'); | |||
10 | const { v4: uuid } = require('uuid'); | 10 | const { v4: uuid } = require('uuid'); |
11 | const crypto = require('crypto'); | 11 | const crypto = require('crypto'); |
12 | 12 | ||
13 | // TODO: This whole controller needs to be changed such that it can support importing from both Franz and Ferdi | ||
13 | const franzRequest = (route, method, auth) => | 14 | const franzRequest = (route, method, auth) => |
14 | new Promise((resolve, reject) => { | 15 | new Promise((resolve, reject) => { |
15 | const base = 'https://api.franzinfra.com/v1/'; | 16 | const base = 'https://api.franzinfra.com/v1/'; |
16 | const user = | 17 | const user = |
17 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Ferdi/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; | 18 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; |
18 | 19 | ||
19 | try { | 20 | try { |
20 | fetch(base + route, { | 21 | fetch(base + route, { |
@@ -247,7 +248,7 @@ class UserController { | |||
247 | 248 | ||
248 | const base = 'https://api.franzinfra.com/v1/'; | 249 | const base = 'https://api.franzinfra.com/v1/'; |
249 | const userAgent = | 250 | const userAgent = |
250 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Ferdi/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; | 251 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; |
251 | 252 | ||
252 | // Try to get an authentication token | 253 | // Try to get an authentication token |
253 | let token; | 254 | let token; |
@@ -377,7 +378,7 @@ class UserController { | |||
377 | } | 378 | } |
378 | 379 | ||
379 | return response.send( | 380 | return response.send( |
380 | 'Your account has been imported. You can now use your Franz account in Ferdi.', | 381 | 'Your account has been imported. You can now use your Franz/Ferdi account in Ferdium.', |
381 | ); | 382 | ); |
382 | } | 383 | } |
383 | } | 384 | } |