diff options
author | 2021-09-14 10:34:04 +0200 | |
---|---|---|
committer | 2021-09-14 10:34:04 +0200 | |
commit | 979ec02c9a1019152be08705986337e470eabb57 (patch) | |
tree | 6021179ad8649112717a499780f475275af487f2 /src/helpers/serverless-helpers.ts | |
parent | refactor: defensive programming to avoid javascript error for unread badges (diff) | |
download | ferdium-app-979ec02c9a1019152be08705986337e470eabb57.tar.gz ferdium-app-979ec02c9a1019152be08705986337e470eabb57.tar.zst ferdium-app-979ec02c9a1019152be08705986337e470eabb57.zip |
chore: codebase improvements (#1930)
Diffstat (limited to 'src/helpers/serverless-helpers.ts')
-rw-r--r-- | src/helpers/serverless-helpers.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/helpers/serverless-helpers.ts b/src/helpers/serverless-helpers.ts new file mode 100644 index 000000000..01549e038 --- /dev/null +++ b/src/helpers/serverless-helpers.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import { LOCAL_SERVER } from '../config'; | ||
2 | |||
3 | export default function useLocalServer(actions) { | ||
4 | // Use local server for user | ||
5 | actions.settings.update({ | ||
6 | type: 'app', | ||
7 | data: { | ||
8 | server: LOCAL_SERVER, | ||
9 | }, | ||
10 | }); | ||
11 | |||
12 | // Log into local server | ||
13 | // Credentials are ignored by the server but the client requires them | ||
14 | actions.user.login({ | ||
15 | email: 'ferdi@localhost', | ||
16 | password: 'FERDI_', | ||
17 | }); | ||
18 | } | ||