diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-23 11:46:58 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-23 11:46:58 +0200 |
commit | bf521e82e0128a2cc31a51f866fd5a86dc677a87 (patch) | |
tree | 9eaeb0dbb8eda2c22a7c48027796c2400ef15f51 /handler.go | |
parent | 6bd17ab810ec1eaa1f93ef7136ee4008337a2f14 (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.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 } |