From ad705f601c7a4bd90f4ab5d13a48e4ee95fabfb8 Mon Sep 17 00:00:00 2001 From: Yader Velasquez Date: Thu, 8 Feb 2024 18:09:49 -0600 Subject: [PATCH] Moving SlackAuthResponse from links to slack pkg --- slack/routes.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/slack/routes.go b/slack/routes.go index 4780ab6..f86dd30 100644 --- a/slack/routes.go +++ b/slack/routes.go @@ -26,6 +26,16 @@ import ( "netlandish.com/x/gobwebs/validate" ) +// SlackAuthResponse ... +type SlackAuthResponse struct { + Ok bool `json:"ok"` + AccessToken string `json:"access_token"` + Team struct { + Name string `json:"name"` + ID string `json:"id"` + } `json:"team"` +} + // Service is the base accounts service struct type Service struct { name string @@ -337,7 +347,7 @@ func (s *Service) ConnectSlack(c echo.Context) error { return err } - var slackResp links.SlackAuthResponse + var slackResp SlackAuthResponse err = json.Unmarshal(body, &slackResp) if err != nil { return err -- 2.45.2