category route added and coded

added api.go where api routes will be built (will move code from
server.go in the future to api.go that fits that) and coded out the
category route (delete, post, and get)
This commit is contained in:
Derek McQuay
2017-02-04 22:33:28 -08:00
parent 95e85aa011
commit d168a117d2
3 changed files with 98 additions and 16 deletions
+2
View File
@@ -23,6 +23,7 @@ func addRoutes(sm *http.ServeMux, server *Server, staticFiles string) {
"auth": "/api/v0/auth/",
"health": "/healthz",
"list": "/api/v0/list/",
"category": "/api/v0/category/",
"tranx": "/api/v0/tranx/",
"cost": "/api/v0/costpermonth/",
@@ -72,6 +73,7 @@ func addRoutes(sm *http.ServeMux, server *Server, staticFiles string) {
//sm.HandleFunc(prefix["list"], server.listUsers)
//sm.HandleFunc(prefix["tranx"], server.tranx)
//sm.HandleFunc(prefix["cost"], server.costPerMonth)
sm.HandleFunc(prefix["category"], server.category)
sm.HandleFunc(prefix["protected"], server.plist)
sm.HandleFunc(prefix["info"], server.serverInfo)
sm.HandleFunc(prefix["login"], server.login)