read ccli license from global config
This commit is contained in:
16
src/app/services/config.service.spec.ts
Normal file
16
src/app/services/config.service.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
|
||||
import {ConfigService} from './config.service';
|
||||
|
||||
describe('ConfigService', () => {
|
||||
let service: ConfigService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ConfigService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
16
src/app/services/config.service.ts
Normal file
16
src/app/services/config.service.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {DbService} from './db.service';
|
||||
import {Observable} from 'rxjs';
|
||||
import {Config} from './config';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ConfigService {
|
||||
constructor(private db: DbService) {
|
||||
}
|
||||
|
||||
public get get$(): Observable<Config> {
|
||||
return this.db.doc$<Config>('global/config');
|
||||
}
|
||||
}
|
||||
3
src/app/services/config.ts
Normal file
3
src/app/services/config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface Config {
|
||||
ccliLicenseId: string
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
import {ChordMode} from '../../widget-modules/components/song-text/song-text.component';
|
||||
import {roles} from './roles';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
name: string;
|
||||
role: roles;
|
||||
role: string;
|
||||
chordMode: ChordMode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user