create api-utils to hold convenience convenience data structures

This commit is contained in:
Jesse Lucas 2020-03-14 20:06:35 -04:00
parent ebf0541385
commit 4727570870
2 changed files with 7 additions and 4 deletions

6
src/app/api-utils.ts Normal file
View File

@ -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/'

View File

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