More debug code

This commit is contained in:
Jonathan Ervine 2020-08-28 11:45:52 +08:00
parent f9f254e9fc
commit 699d101ca5

View File

@ -30,7 +30,7 @@ type SlackConfig struct {
// PostHandler send notifications from synology to slack
func PostHandler(w http.ResponseWriter, r *http.Request) {
log.Printf(r.Header)
log.Printf(r.Header.Get)
if r.Header.Get("api_key") != appConfig.APIKey {
http.Error(w, "invalid api key", http.StatusUnauthorized)
log.Printf("invalid api key")