srijeet0406 commented on a change in pull request #5495:
URL: https://github.com/apache/trafficcontrol/pull/5495#discussion_r570514487



##########
File path: traffic_ops/traffic_ops_golang/topology/topologies.go
##########
@@ -394,8 +394,10 @@ func (topology TOTopology) GetKeys() 
(map[string]interface{}, bool) {
 
 // SetKeys is a requirement of the api.Updater interface and is called by
 // api.UpdateHandler().
+// SetKeys function will no longer makes the name key immutable by setting it 
to
+// query param. On 2/3/21, the requirement was added to change the topology 
name.
 func (topology *TOTopology) SetKeys(keys map[string]interface{}) {
-       topology.Name, _ = keys["name"].(string)
+       //topology.Name, _ = keys["name"].(string)

Review comment:
       You can remove the commented out line.

##########
File path: traffic_ops/traffic_ops_golang/topology/topologies.go
##########
@@ -572,10 +574,11 @@ func (topology *TOTopology) addParents() (error, error, 
int) {
        return nil, nil, http.StatusOK
 }
 
-func (topology *TOTopology) setDescription() (error, error, int) {
-       rows, err := topology.ReqInfo.Tx.Query(updateQuery(), 
topology.Description, topology.Name)
+func (topology *TOTopology) setNameDescription() (error, error, int) {

Review comment:
       I think we should just change the name of this function to 
`setTopologyDetails` or something on those lines. 




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

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


Reply via email to