Skip to content

Commit

Permalink
Adding comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mihok committed Apr 1, 2017
1 parent bafaffe commit f9284e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chat/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func Routes(router *httprouter.Router, ds *store.InMemory) {

}

/*
notImplemented is a helper function for intentionally unimplemented routes */
func notImplemented(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
resp.Header().Set("Content-Type", "text/plain; charset=UTF-8")
resp.WriteHeader(http.StatusNotImplemented)
Expand All @@ -68,6 +70,7 @@ func notImplemented(resp http.ResponseWriter, req *http.Request, params httprout
// Chats

/*
GET /api/chat
GET /api/chats */
func readChats(ds *store.InMemory) func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
return func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
Expand Down Expand Up @@ -125,6 +128,7 @@ func deleteChat(ds *store.InMemory) func(resp http.ResponseWriter, req *http.Req
// Chat Messages

/*
GET /api/chat/:id/message
GET /api/chat/:id/messages */
func readMessages(ds *store.InMemory) func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
return func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
Expand Down
3 changes: 3 additions & 0 deletions client/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func Routes(router *httprouter.Router, ds *store.InMemory) {
router.DELETE("/api/client/:id", deleteClient(ds)) // Not Implement
}

/*
notImplemented is a helper function for intentionally unimplemented routes */
func notImplemented(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
resp.Header().Set("Content-Type", "text/plain; charset=UTF-8")
resp.WriteHeader(http.StatusNotImplemented)
Expand All @@ -51,6 +53,7 @@ func notImplemented(resp http.ResponseWriter, req *http.Request, params httprout
// Clients

/*
GET /api/client
GET /api/clients */
func readClients(ds *store.InMemory) func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
return func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
Expand Down
1 change: 1 addition & 0 deletions operator/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func Routes(router *httprouter.Router, ds *store.InMemory) {
// Operators

/*
GET /api/operator
GET /api/operators */
func readOperators(ds *store.InMemory) func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
return func(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
Expand Down

0 comments on commit f9284e8

Please sign in to comment.