search by id
This commit is contained in:
parent
62a4f2ec56
commit
92f3e6bab8
13 changed files with 183 additions and 29 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue