aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-23 11:46:58 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-23 11:46:58 +0200
commitbf521e82e0128a2cc31a51f866fd5a86dc677a87 (patch)
tree9eaeb0dbb8eda2c22a7c48027796c2400ef15f51 /handler.go
parent6bd17ab810ec1eaa1f93ef7136ee4008337a2f14 (diff)
refactored type.go
Moved structures for in/out HTTP data into reqres.go and added basic doc comments. A few minor edits as well to make things consistent.
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/handler.go b/handler.go
index 10defba..b6a52f8 100644
--- a/handler.go
+++ b/handler.go
@@ -115,9 +115,8 @@ func unpackRequest(r *http.Request, unpack interface{}) error {
// getEntries provides a list of entries from the Trillian backend
func getEntries(ctx context.Context, i *instance, w http.ResponseWriter, r *http.Request) (int, error) {
glog.Info("in getEntries")
-
- var request GetEntriesRequest
- if err := request.Unpack(r); err != nil {
+ request, err := NewGetEntriesRequest(r)
+ if err != nil {
return http.StatusBadRequest, err
}