From 472757087076b835be27812056b1cd71629b521e Mon Sep 17 00:00:00 2001 From: Jesse Lucas Date: Sat, 14 Mar 2020 20:06:35 -0400 Subject: [PATCH] create api-utils to hold convenience convenience data structures --- src/app/api-utils.ts | 6 ++++++ src/app/app.module.ts | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/app/api-utils.ts diff --git a/src/app/api-utils.ts b/src/app/api-utils.ts new file mode 100644 index 000000000..44432b967 --- /dev/null +++ b/src/app/api-utils.ts @@ -0,0 +1,6 @@ +export const deviceID = (): String => { + const dID: String = globalThis.metadata['deviceID']; + return dID.substring(0, 5) +} + +export const apiURL: String = 'http://127.0.0.1:8384/' \ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 91ad36bb9..392e5df9d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -15,11 +15,8 @@ import { FolderListComponent } from './folder-list/folder-list.component'; import { DeviceListComponent } from './device-list/device-list.component'; import { StatusToggleComponent } from './status-toggle/status-toggle.component'; import { DeviceListDataSource } from './device-list/device-list-datasource'; +import { deviceID } from './api-utils'; -const deviceID = (): String => { - const dID: String = globalThis.metadata['deviceID']; - return dID.substring(0, 5) -} @NgModule({ declarations: [