File: /var/dev/nowruzgan/admin/src/app/services/getty.service.ts
import { Injectable } from '@angular/core';
import { GenericService } from './generic.service';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class GettyService extends GenericService {
async search(value: string): Promise<any[]> {
let response: any = await this.http
.get(`${environment.apiBase}/lexicon/getty/term?filter=${value}`, this.headers)
.toPromise().catch(e => {this.handleError(e); return false;});
return response?.list || [];
}
}