aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-04-24 12:23:44 -0500
committerLibravatar GitHub <noreply@github.com>2022-04-24 12:23:44 -0500
commit442ef142fc4bd7c430d8a1314535f03576f616f6 (patch)
tree10d8df84e8c5ba68b7dd0bf6bc1e0add6a766b63 /app
parentfix: branding on README.md (diff)
downloadferdium-server-442ef142fc4bd7c430d8a1314535f03576f616f6.tar.gz
ferdium-server-442ef142fc4bd7c430d8a1314535f03576f616f6.tar.zst
ferdium-server-442ef142fc4bd7c430d8a1314535f03576f616f6.zip
Rebranded from 'ferdi' to 'ferdium' (#4)
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/Http/DashboardController.js4
-rw-r--r--app/Controllers/Http/RecipeController.js2
-rw-r--r--app/Controllers/Http/StaticController.js12
-rw-r--r--app/Controllers/Http/UserController.js7
4 files changed, 13 insertions, 12 deletions
diff --git a/app/Controllers/Http/DashboardController.js b/app/Controllers/Http/DashboardController.js
index 84a88a9..e7c38c2 100644
--- a/app/Controllers/Http/DashboardController.js
+++ b/app/Controllers/Http/DashboardController.js
@@ -222,14 +222,14 @@ class DashboardController {
222 try { 222 try {
223 file = JSON.parse(request.input('file')); 223 file = JSON.parse(request.input('file'));
224 } catch (e) { 224 } catch (e) {
225 session.flash({ type: 'danger', message: 'Invalid Ferdi account file' }); 225 session.flash({ type: 'danger', message: 'Invalid Ferdium account file' });
226 return response.redirect('back'); 226 return response.redirect('back');
227 } 227 }
228 228
229 if (!file || !file.services || !file.workspaces) { 229 if (!file || !file.services || !file.workspaces) {
230 session.flash({ 230 session.flash({
231 type: 'danger', 231 type: 'danger',
232 message: 'Invalid Ferdi account file (2)', 232 message: 'Invalid Ferdium account file (2)',
233 }); 233 });
234 return response.redirect('back'); 234 return response.redirect('back');
235 } 235 }
diff --git a/app/Controllers/Http/RecipeController.js b/app/Controllers/Http/RecipeController.js
index 4fad74e..cbdddaf 100644
--- a/app/Controllers/Http/RecipeController.js
+++ b/app/Controllers/Http/RecipeController.js
@@ -136,7 +136,7 @@ class RecipeController {
136 // Get results 136 // Get results
137 let results; 137 let results;
138 138
139 if (needle === 'ferdi:custom') { 139 if (needle === 'ferdium:custom') {
140 const dbResults = (await Recipe.all()).toJSON(); 140 const dbResults = (await Recipe.all()).toJSON();
141 results = dbResults.map((recipe) => ({ 141 results = dbResults.map((recipe) => ({
142 id: recipe.recipeId, 142 id: recipe.recipeId,
diff --git a/app/Controllers/Http/StaticController.js b/app/Controllers/Http/StaticController.js
index aad1059..abba249 100644
--- a/app/Controllers/Http/StaticController.js
+++ b/app/Controllers/Http/StaticController.js
@@ -31,8 +31,8 @@ class StaticController {
31 isTodosEnabled: true, 31 isTodosEnabled: true,
32 isTodosIncludedInCurrentPlan: true, 32 isTodosIncludedInCurrentPlan: true,
33 defaultTrialPlan: 'franz-pro-yearly', 33 defaultTrialPlan: 'franz-pro-yearly',
34 subscribeURL: 'https://getferdi.com', 34 subscribeURL: 'https://ferdium.org',
35 planSelectionURL: 'https://getferdi.com', 35 planSelectionURL: 'https://ferdium.org',
36 hasInlineCheckout: true, 36 hasInlineCheckout: true,
37 isPlanSelectionEnabled: false, 37 isPlanSelectionEnabled: false,
38 isTrialStatusBarEnabled: false, 38 isTrialStatusBarEnabled: false,
@@ -43,24 +43,24 @@ class StaticController {
43 plans: { 43 plans: {
44 personal: { 44 personal: {
45 monthly: { 45 monthly: {
46 id: 'ferdi-free', 46 id: 'ferdium-free',
47 price: 0, 47 price: 0,
48 billed: 0, 48 billed: 0,
49 }, 49 },
50 yearly: { 50 yearly: {
51 id: 'ferdi-completely-free', 51 id: 'ferdium-completely-free',
52 price: 0, 52 price: 0,
53 billed: 0, 53 billed: 0,
54 }, 54 },
55 }, 55 },
56 pro: { 56 pro: {
57 monthly: { 57 monthly: {
58 id: 'ferdi-still-free', 58 id: 'ferdium-still-free',
59 price: 0, 59 price: 0,
60 billed: 0, 60 billed: 0,
61 }, 61 },
62 yearly: { 62 yearly: {
63 id: 'ferdi-forever-free', 63 id: 'ferdium-forever-free',
64 price: 0, 64 price: 0,
65 billed: 0, 65 billed: 0,
66 }, 66 },
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');
10const { v4: uuid } = require('uuid'); 10const { v4: uuid } = require('uuid');
11const crypto = require('crypto'); 11const 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
13const franzRequest = (route, method, auth) => 14const 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}