rimashah25 commented on code in PR #7362:
URL: https://github.com/apache/trafficcontrol/pull/7362#discussion_r1122445121


##########
experimental/traffic-portal/src/app/api/testing/cache-group.service.ts:
##########
@@ -584,4 +593,39 @@ export class CacheGroupService {
                }
                return this.regions.splice(index, 1)[0];
        }
+
+       public async getASNs(): Promise<Array<ResponseASN>>;
+       public async getASNs(id: number): Promise<ResponseASN>;
+
+       /**
+        * Gets an array of ASNs from Traffic Ops.
+        *
+        * @param id If given, returns only the asn with the given id (number).
+        * @returns An Array of ASNs objects - or a single ASN object if 'id'
+        * was given.
+        */
+       public async getASNs(id?: number): Promise<Array<ResponseASN> | 
ResponseASN> {
+               if(id) {
+                       const asn = this.asns.find(a=>a.asn === id);

Review Comment:
   Ok, let me double conform.



##########
experimental/traffic-portal/src/app/api/testing/cache-group.service.ts:
##########
@@ -584,4 +593,39 @@ export class CacheGroupService {
                }
                return this.regions.splice(index, 1)[0];
        }
+
+       public async getASNs(): Promise<Array<ResponseASN>>;
+       public async getASNs(id: number): Promise<ResponseASN>;
+
+       /**
+        * Gets an array of ASNs from Traffic Ops.
+        *
+        * @param id If given, returns only the asn with the given id (number).
+        * @returns An Array of ASNs objects - or a single ASN object if 'id'
+        * was given.
+        */
+       public async getASNs(id?: number): Promise<Array<ResponseASN> | 
ResponseASN> {
+               if(id) {
+                       const asn = this.asns.find(a=>a.asn === id);

Review Comment:
   Ok, let me double confirm.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to