Update services.go

Added changes to handle response
pull/904/head
Andrew Gerhold 2020-11-27 16:42:29 -08:00 committed by GitHub
parent 5f86b6e1dd
commit b63130aa30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -316,3 +316,13 @@ func apiServiceHitsHandler(r *http.Request) interface{} {
query.Find(&hts)
return hts
}
func apiServiceResponseCodeHandler(w http.ResponseWriter, r *http.Request) interface{} {
service, err := findService(r)
if err != nil {
return err
}
return returnResponseCode(service, w, r)
}