Skip to content

Commit

Permalink
refactor(http): property change for success messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjules committed Apr 11, 2022
1 parent bc609ae commit 71c27f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// Success defines the structure for a successful response.
type Success struct {
Success string `json:"success"`
Message string `json:"message"`
}

// handleHealthCheck godoc
Expand Down Expand Up @@ -182,5 +182,5 @@ func (s *Server) handleCallback(c *gin.Context) {
return
}

c.JSON(http.StatusOK, gin.H{"success": "welcome, you are now authenticated!"})
c.JSON(http.StatusOK, Success{Message: "welcome, you are now authenticated!"})
}

0 comments on commit 71c27f9

Please sign in to comment.