aboutsummaryrefslogtreecommitdiffstats
path: root/app/Controllers/Http/UserController.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/Http/UserController.js')
-rw-r--r--app/Controllers/Http/UserController.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/Controllers/Http/UserController.js b/app/Controllers/Http/UserController.js
index e19e15e..0d768a9 100644
--- a/app/Controllers/Http/UserController.js
+++ b/app/Controllers/Http/UserController.js
@@ -177,6 +177,7 @@ class UserController {
177 ...request.all(), 177 ...request.all(),
178 }; 178 };
179 179
180 // eslint-disable-next-line no-param-reassign
180 auth.user.settings = JSON.stringify(newSettings); 181 auth.user.settings = JSON.stringify(newSettings);
181 await auth.user.save(); 182 await auth.user.save();
182 183
@@ -249,7 +250,7 @@ class UserController {
249 email, 250 email,
250 password: hashedPassword, 251 password: hashedPassword,
251 username: 'Franz', 252 username: 'Franz',
252 lastname: 'Franz' 253 lastname: 'Franz',
253 }); 254 });
254 255
255 return response.send('Your account has been created but due to this server\'s configuration, we could not import your Franz account data.\n\nIf you are the server owner, please set CONNECT_WITH_FRANZ to true to enable account imports.'); 256 return response.send('Your account has been created but due to this server\'s configuration, we could not import your Franz account data.\n\nIf you are the server owner, please set CONNECT_WITH_FRANZ to true to enable account imports.');
@@ -263,7 +264,7 @@ class UserController {
263 try { 264 try {
264 const basicToken = btoa(`${email}:${hashedPassword}`); 265 const basicToken = btoa(`${email}:${hashedPassword}`);
265 const loginBody = { 266 const loginBody = {
266 isZendeskLogin: false 267 isZendeskLogin: false,
267 }; 268 };
268 269
269 const rawResponse = await fetch(`${base}auth/login`, { 270 const rawResponse = await fetch(`${base}auth/login`, {
@@ -273,8 +274,8 @@ class UserController {
273 Authorization: `Basic ${basicToken}`, 274 Authorization: `Basic ${basicToken}`,
274 'User-Agent': userAgent, 275 'User-Agent': userAgent,
275 'Content-Type': 'application/json', 276 'Content-Type': 'application/json',
276 'accept': '*/*', 277 accept: '*/*',
277 'x-franz-source': 'Web' 278 'x-franz-source': 'Web',
278 }, 279 },
279 }); 280 });
280 const content = await rawResponse.json(); 281 const content = await rawResponse.json();
@@ -312,7 +313,7 @@ class UserController {
312 email: userInf.email, 313 email: userInf.email,
313 password: hashedPassword, 314 password: hashedPassword,
314 username: userInf.firstname, 315 username: userInf.firstname,
315 lastname: userInf.lastname 316 lastname: userInf.lastname,
316 }); 317 });
317 } catch (e) { 318 } catch (e) {
318 const errorMessage = `Could not create your user in our system.\nError: ${e}`; 319 const errorMessage = `Could not create your user in our system.\nError: ${e}`;