Some data handling changes
This commit is contained in:
parent
96d74a7732
commit
c67a0bf590
12 changed files with 66 additions and 39 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import {APIModel} from './APIModel';
|
||||
import {APIRequestResult} from './APIRequestResult';
|
||||
import {MediaTypeModel} from '../models/MediaTypeModel';
|
||||
|
||||
export class APIManager {
|
||||
apis: APIModel[];
|
||||
|
|
@ -8,10 +8,10 @@ export class APIManager {
|
|||
this.apis = [];
|
||||
}
|
||||
|
||||
async query(query: string, types: string[] = []): Promise<APIRequestResult[]> {
|
||||
async query(query: string, types: string[] = []): Promise<MediaTypeModel[]> {
|
||||
console.log('MDB | api manager queried');
|
||||
|
||||
let res: APIRequestResult[] = [];
|
||||
let res: MediaTypeModel[] = [];
|
||||
|
||||
for (const api of this.apis) {
|
||||
if (types.length === 0 || api.hasTypeOverlap(types)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue