diff options
author | 2023-12-04 08:52:48 -0700 | |
---|---|---|
committer | 2023-12-04 08:52:48 -0700 | |
commit | 3fc8706007d896dcbde69c0ce924a6a5eb66aba6 (patch) | |
tree | 008bbcfc14d819cd2f744eb16607b6aa9c4ad0bf /src/internal-server/app/Controllers/Http | |
parent | chore: project maintenance (#1466) (diff) | |
download | ferdium-app-3fc8706007d896dcbde69c0ce924a6a5eb66aba6.tar.gz ferdium-app-3fc8706007d896dcbde69c0ce924a6a5eb66aba6.tar.zst ferdium-app-3fc8706007d896dcbde69c0ce924a6a5eb66aba6.zip |
refactor: implement biome (#1467)
- add `biome.json`
- add `biome:check` and `biome:check:fix` commands to `package.json`
- add `biome:check:fix` command to run as part of `prepare-code` command
- install `@biomejs/biome` dependency
- add `@npmcli/move-file` v2.0.1 to `pnpm.allowedDeprecatedVersions`
- fix or comment out various reported lint issues
Diffstat (limited to 'src/internal-server/app/Controllers/Http')
-rw-r--r-- | src/internal-server/app/Controllers/Http/RecipeController.js | 8 | ||||
-rw-r--r-- | src/internal-server/app/Controllers/Http/ServiceController.js | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/internal-server/app/Controllers/Http/RecipeController.js b/src/internal-server/app/Controllers/Http/RecipeController.js index 3e54ab65b..48d3ce7e5 100644 --- a/src/internal-server/app/Controllers/Http/RecipeController.js +++ b/src/internal-server/app/Controllers/Http/RecipeController.js | |||
@@ -59,8 +59,8 @@ class RecipeController { | |||
59 | })); | 59 | })); |
60 | } else { | 60 | } else { |
61 | let remoteResults = []; | 61 | let remoteResults = []; |
62 | // eslint-disable-next-line eqeqeq | 62 | |
63 | if (Env.get('CONNECT_WITH_FRANZ') == 'true') { | 63 | if (Env.get('CONNECT_WITH_FRANZ') === 'true') { |
64 | const recipesUrlFetch = await fetch( | 64 | const recipesUrlFetch = await fetch( |
65 | `${RECIPES_URL}/search?needle=${encodeURIComponent(needle)}`, | 65 | `${RECIPES_URL}/search?needle=${encodeURIComponent(needle)}`, |
66 | ); | 66 | ); |
@@ -123,8 +123,8 @@ class RecipeController { | |||
123 | if (await Drive.exists(`${service}.tar.gz`)) { | 123 | if (await Drive.exists(`${service}.tar.gz`)) { |
124 | return response.send(await Drive.get(`${service}.tar.gz`)); | 124 | return response.send(await Drive.get(`${service}.tar.gz`)); |
125 | } | 125 | } |
126 | // eslint-disable-next-line eqeqeq | 126 | |
127 | if (Env.get('CONNECT_WITH_FRANZ') == 'true') { | 127 | if (Env.get('CONNECT_WITH_FRANZ') === 'true') { |
128 | return response.redirect(`${RECIPES_URL}/download/${service}`); | 128 | return response.redirect(`${RECIPES_URL}/download/${service}`); |
129 | } | 129 | } |
130 | return response.status(400).send({ | 130 | return response.status(400).send({ |
diff --git a/src/internal-server/app/Controllers/Http/ServiceController.js b/src/internal-server/app/Controllers/Http/ServiceController.js index 940cac065..8e8aa97a8 100644 --- a/src/internal-server/app/Controllers/Http/ServiceController.js +++ b/src/internal-server/app/Controllers/Http/ServiceController.js | |||
@@ -126,10 +126,9 @@ class ServiceController { | |||
126 | const newSettings = { | 126 | const newSettings = { |
127 | ...settings, | 127 | ...settings, |
128 | iconId, | 128 | iconId, |
129 | customIconVersion: | 129 | customIconVersion: settings?.customIconVersion |
130 | settings && settings.customIconVersion | 130 | ? settings.customIconVersion + 1 |
131 | ? settings.customIconVersion + 1 | 131 | : 1, |
132 | : 1, | ||
133 | }; | 132 | }; |
134 | 133 | ||
135 | // Update data in database | 134 | // Update data in database |