(db *sql.DB)
| 9 | ) |
| 10 | |
| 11 | func handleExceptionsList(db *sql.DB) http.HandlerFunc { |
| 12 | return func(w http.ResponseWriter, r *http.Request) { |
| 13 | q := r.URL.Query() |
| 14 | grouped := q.Get("grouped") == "true" |
| 15 | |
| 16 | if grouped { |
| 17 | handleExceptionsGrouped(db, w, r) |
| 18 | } else { |
| 19 | handleExceptionsChronological(db, w, r) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func handleExceptionsGrouped(db *sql.DB, w http.ResponseWriter, r *http.Request) { |
| 25 | limit, offset := pagination(r, 50) |
no test coverage detected