diff options
Diffstat (limited to 'src/api/server/LocalApi.ts')
-rw-r--r-- | src/api/server/LocalApi.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index 28028bf80..a292bc42d 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts | |||
@@ -4,15 +4,14 @@ import fastFolderSize from 'fast-folder-size'; | |||
4 | 4 | ||
5 | import { getServicePartitionsDirectory } from '../../helpers/service-helpers'; | 5 | import { getServicePartitionsDirectory } from '../../helpers/service-helpers'; |
6 | 6 | ||
7 | // TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed | 7 | const debug = require('../../preload-safe-debug')('Ferdium:LocalApi'); |
8 | // const debug = require('debug')('Ferdium:LocalApi'); | ||
9 | 8 | ||
10 | export default class LocalApi { | 9 | export default class LocalApi { |
11 | // Settings | 10 | // Settings |
12 | getAppSettings(type: string) { | 11 | getAppSettings(type: string) { |
13 | return new Promise(resolve => { | 12 | return new Promise(resolve => { |
14 | ipcRenderer.once('appSettings', (_event, resp) => { | 13 | ipcRenderer.once('appSettings', (_event, resp) => { |
15 | console.log('LocalApi::getAppSettings resolves', resp.type, resp.data); | 14 | debug('LocalApi::getAppSettings resolves', resp.type, resp.data); |
16 | resolve(resp); | 15 | resolve(resp); |
17 | }); | 16 | }); |
18 | 17 | ||
@@ -21,7 +20,7 @@ export default class LocalApi { | |||
21 | } | 20 | } |
22 | 21 | ||
23 | async updateAppSettings(type: string, data: any) { | 22 | async updateAppSettings(type: string, data: any) { |
24 | console.log('LocalApi::updateAppSettings resolves', type, data); | 23 | debug('LocalApi::updateAppSettings resolves', type, data); |
25 | ipcRenderer.send('updateAppSettings', { | 24 | ipcRenderer.send('updateAppSettings', { |
26 | type, | 25 | type, |
27 | data, | 26 | data, |
@@ -40,7 +39,7 @@ export default class LocalApi { | |||
40 | reject(err); | 39 | reject(err); |
41 | } | 40 | } |
42 | 41 | ||
43 | console.log('LocalApi::getAppCacheSize resolves', bytes); | 42 | debug('LocalApi::getAppCacheSize resolves', bytes); |
44 | resolve(bytes); | 43 | resolve(bytes); |
45 | }, | 44 | }, |
46 | ); | 45 | ); |