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: [