This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit 3704f628619b48f8cd6b7e5f0707d8d97d782848
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Fri Mar 2 13:25:32 2018 -0700

    added routes for /types
---
 traffic_ops/traffic_ops_golang/routes.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/traffic_ops/traffic_ops_golang/routes.go 
b/traffic_ops/traffic_ops_golang/routes.go
index 84c7dc0..7c7df77 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -40,6 +40,7 @@ import (
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/region"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/status"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/systeminfo"
+       
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/types"
        "github.com/basho/riak-go-client"
 )
 
@@ -122,6 +123,13 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
                {1.3, http.MethodPost, `statuses/?$`, 
api.CreateHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
                {1.3, http.MethodDelete, `statuses/{id}$`, 
api.DeleteHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
+               //Types
+               {1.3, http.MethodGet, `types/?(\.json)?$`, 
api.ReadHandler(types.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {1.3, http.MethodGet, `types/{id}$`, 
api.ReadHandler(types.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {1.3, http.MethodPut, `types/{id}$`, 
api.UpdateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodPost, `types/?$`, 
api.CreateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodDelete, `types/{id}$`, 
api.DeleteHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+
                //Divisions
                {1.3, http.MethodGet, `divisions/?(\.json)?$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
                {1.3, http.MethodGet, `divisions/{id}$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},

-- 
To stop receiving notification emails like this one, please contact
dang...@apache.org.

Reply via email to