From 1b148092b9c38ec141976313844d504bc15df088 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:22:42 -0600 Subject: [PATCH] on slack webhook storage.Upsert message --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8b3782c..9e384c9 100644 --- a/main.go +++ b/main.go @@ -122,7 +122,9 @@ func _newHandlerPostAPIV1EventsSlack(cfg Config) http.HandlerFunc { return } - log.Printf("message: %+v", m) - http.Error(w, "not impl", http.StatusNotImplemented) + if err := cfg.storage.Upsert(ctx, m); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } } }