diff options
author | 2019-10-18 21:20:45 +0200 | |
---|---|---|
committer | 2019-10-18 21:20:45 +0200 | |
commit | b95bf31e572f0a936b1a138c5c5278ea050ba8b5 (patch) | |
tree | d81e2ddabac27a75f94485e2be06dedb90c0037d /src/server | |
parent | Allow import data from different servers (diff) | |
download | ferdium-app-b95bf31e572f0a936b1a138c5c5278ea050ba8b5.tar.gz ferdium-app-b95bf31e572f0a936b1a138c5c5278ea050ba8b5.tar.zst ferdium-app-b95bf31e572f0a936b1a138c5c5278ea050ba8b5.zip |
Fix lint
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/app/Controllers/Http/UserController.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/app/Controllers/Http/UserController.js b/src/server/app/Controllers/Http/UserController.js index be7ebe5fe..07e118afd 100644 --- a/src/server/app/Controllers/Http/UserController.js +++ b/src/server/app/Controllers/Http/UserController.js | |||
@@ -3,7 +3,6 @@ const Workspace = use('App/Models/Workspace'); | |||
3 | const { | 3 | const { |
4 | validateAll, | 4 | validateAll, |
5 | } = use('Validator'); | 5 | } = use('Validator'); |
6 | const Env = use('Env'); | ||
7 | 6 | ||
8 | const btoa = require('btoa'); | 7 | const btoa = require('btoa'); |
9 | const fetch = require('node-fetch'); | 8 | const fetch = require('node-fetch'); |
@@ -11,7 +10,7 @@ const uuid = require('uuid/v4'); | |||
11 | const crypto = require('crypto'); | 10 | const crypto = require('crypto'); |
12 | 11 | ||
13 | const apiRequest = (url, route, method, auth) => new Promise((resolve, reject) => { | 12 | const apiRequest = (url, route, method, auth) => new Promise((resolve, reject) => { |
14 | const base = url + '/v1/'; | 13 | const base = `${url}/v1/`; |
15 | const user = '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'; | 14 | const user = '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'; |
16 | 15 | ||
17 | try { | 16 | try { |
@@ -126,7 +125,7 @@ class UserController { | |||
126 | 125 | ||
127 | const hashedPassword = crypto.createHash('sha256').update(password).digest('base64'); | 126 | const hashedPassword = crypto.createHash('sha256').update(password).digest('base64'); |
128 | 127 | ||
129 | const base = server + '/v1/'; | 128 | const base = `${server}/v1/`; |
130 | const userAgent = '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'; | 129 | const userAgent = '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'; |
131 | 130 | ||
132 | // Try to get an authentication token | 131 | // Try to get an authentication token |