comparison pkg/controllers/routes.go @ 812:98a7776100fb

Added end point lo list available surveys for a given bottleneck.
author Sascha Wilde <wilde@intevation.de>
date Thu, 27 Sep 2018 17:25:03 +0200
parents b6a1779ffb42
children 8926c413db21
comparison
equal deleted inserted replaced
811:9b982e50e938 812:98a7776100fb
101 api.Handle("/published", any(&JSONHandler{ 101 api.Handle("/published", any(&JSONHandler{
102 Handle: published, 102 Handle: published,
103 NoConn: true, 103 NoConn: true,
104 })).Methods(http.MethodGet) 104 })).Methods(http.MethodGet)
105 105
106 // Bottleneck selection
107 api.Handle("/surveys/{bottleneck}", any(&JSONHandler{
108 Handle: listSurveys,
109 })).Methods(http.MethodGet)
110
106 // Cross sections 111 // Cross sections
107 112
108 api.Handle("/cross", any(&JSONHandler{ 113 api.Handle("/cross", any(&JSONHandler{
109 Input: func() interface{} { return new(models.CrossSectionInput) }, 114 Input: func() interface{} { return new(models.CrossSectionInput) },
110 Handle: crossSection, 115 Handle: crossSection,