import {Injectable} from '@angular/core'; import {NetworkService} from '../../model/network/network.service'; import {DuplicatesDTO} from '../../../../common/entities/DuplicatesDTO'; import {BehaviorSubject} from 'rxjs'; @Injectable() export class DuplicateService { public duplicates: BehaviorSubject; constructor(private networkService: NetworkService) { this.duplicates = new BehaviorSubject(null); } public async getDuplicates() { this.duplicates.next(await this.networkService.getJson('/admin/duplicates')); } }