Add comments

main
Kegan Dougal 2017-02-03 16:32:55 +00:00
parent 225cce9c77
commit b04dfae9c5
2 changed files with 4 additions and 0 deletions

View File

@ -7,8 +7,10 @@ import (
"github.com/matrix-org/util"
)
// Sync handles HTTP requests to /sync
type Sync struct{}
// OnIncomingRequest implements util.JSONRequestHandler
func (s *Sync) OnIncomingRequest(req *http.Request) (interface{}, *util.HTTPError) {
logger := req.Context().Value(util.CtxValueLogger).(*log.Entry)
logger.Info("Doing stuff...")

View File

@ -7,9 +7,11 @@ import (
"github.com/matrix-org/util"
)
// SendMessage handles HTTP requests to /rooms/$room_id/send/$event_type
type SendMessage struct {
}
// OnIncomingRequest implements util.JSONRequestHandler
func (s *SendMessage) OnIncomingRequest(req *http.Request) (interface{}, *util.HTTPError) {
logger := req.Context().Value(util.CtxValueLogger).(*log.Entry)
logger.Info("Doing stuff...")