mattjackson220 commented on a change in pull request #4477: Deprecate
parameters/profile/:name
URL: https://github.com/apache/trafficcontrol/pull/4477#discussion_r391798838
##########
File path:
traffic_ops/traffic_ops_golang/profileparameter/parameterprofilebyname.go
##########
@@ -22,20 +22,59 @@ package profileparameter
import (
"database/sql"
"errors"
+ "github.com/apache/trafficcontrol/lib/go-util"
"net/http"
"github.com/apache/trafficcontrol/lib/go-tc"
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
)
+const API_PROFILES_NAME_NAME_PARAMETERS = "profiles/name/:name/parameters"
+
+func GetProfileNameDeprecated(w http.ResponseWriter, r *http.Request) {
+ getProfileName(w, r, true)
+}
+
func GetProfileName(w http.ResponseWriter, r *http.Request) {
+ getProfileName(w, r, false)
+}
+
+func deprecationString(deprecated bool) *string {
Review comment:
actually it might be good to put that in api.go and pull the alternative out
as a parameter as well so that we can use it if we have other deprecated
endpoints that are used in their respective alternatives as well
----------------------------------------------------------------
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]
With regards,
Apache Git Services