gbkannan89 commented on code in PR #7358:
URL: https://github.com/apache/trafficcontrol/pull/7358#discussion_r1175911998


##########
experimental/traffic-portal/src/app/api/testing/server.service.ts:
##########
@@ -302,4 +303,55 @@ export class ServerService {
                srv.statusId = status.id;
                srv.offlineReason = offlineReason ?? null;
        }
+
+       /**
+        * Creates a status.
+        *
+        * @param status The status details (name & description) to create. 
Description is an optional property in status.
+        * @returns The status as created and returned by the API.
+        */
+       public async createStatus(status: RequestStatus): 
Promise<ResponseStatus> {
+               const newStatus = {
+                       description: status.description ? status.description : 
null,
+                       id: ++this.statusIdCounter,
+                       lastUpdated: new Date(),
+                       name: status.name
+               };
+               this.statuses.push(newStatus);
+               return newStatus;
+       }
+
+       /**
+        * Updates status Details.
+        *
+        * @param payload containes name and description for the status., 
unique identifier thereof.
+        * @param id The Status ID
+        */
+       public async updateStatusDetail(payload: ResponseStatus, id: number): 
Promise<ResponseStatus> {

Review Comment:
   I didn't get the point.



-- 
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