search by id

This commit is contained in:
mProjectsCode 2022-05-11 23:41:55 +02:00
parent 62a4f2ec56
commit 92f3e6bab8
13 changed files with 183 additions and 29 deletions

View file

@ -42,6 +42,16 @@ export class APIManager {
}
}
getApiByName(name: string): APIModel {
for (const api of this.apis) {
if (api.apiName === name) {
return api;
}
}
return null;
}
registerAPI(api: APIModel): void {
this.apis.push(api);
}