Skip to content

Commit

Permalink
Fix slack bot command message when key not found
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbrazier committed Jun 11, 2020
1 parent c3bb7e5 commit 6bd0272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/handler/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (h *Handler) SlackCommand(c echo.Context) error {
}
appURI := config.GetConfig().AppURI
url, err := urlModel.Find(key)
if err != nil {
if err != nil || url == nil {
response.Text = fmt.Sprintf("The URL key you provided was not found. Why not add it? %s/go/%s", appURI, key)
return c.JSON(http.StatusOK, response)
}
Expand Down

0 comments on commit 6bd0272

Please sign in to comment.