File tree 1 file changed +8
-14
lines changed
1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,11 @@ func parseChecks(checks []Check) string {
104
104
105
105
func getServiceHealth (c * gin.Context ) {
106
106
107
- var service Service
108
- var warn Warn
109
- c .BindQuery (& service )
110
- c .BindQuery (& warn )
111
- warnEnabled := parseBoolValue (warn .warn )
107
+ var queryString QueryString
108
+ c .BindQuery (& queryString )
109
+ warnEnabled := parseBoolValue (queryString .Warn )
112
110
113
- checks := getChecks (service . ID )
111
+ checks := getChecks (queryString . ServiceID )
114
112
115
113
aggregatedStatus := parseChecks (checks )
116
114
@@ -154,14 +152,10 @@ func main() {
154
152
}
155
153
}
156
154
157
- // Service defines the data parsed from URL's querystring
158
- type Service struct {
159
- ID string `form:"service"`
160
- }
161
-
162
- // Warn defines the data parsed from URL's querystring
163
- type Warn struct {
164
- warn string `form:"warn"`
155
+ // QueryString defines the data parsed from URL's querystring
156
+ type QueryString struct {
157
+ ServiceID string `form:"service"`
158
+ Warn string `form:"warn"`
165
159
}
166
160
167
161
// Check defines the check data to be returned via the API's JSON response
You can’t perform that action at this time.
0 commit comments