Skip to content

Commit

Permalink
Rebase with main
Browse files Browse the repository at this point in the history
  • Loading branch information
matherg committed Oct 17, 2023
1 parent fec54af commit 8847a7a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions api/src/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ func (pg *PgController) Serve() *gin.Engine {
}
c.JSON(http.StatusOK, gifts)
})
////
r.GET("/gifts", func(c *gin.Context) {
gifts, err := pg.AllGifts()
if err != nil {
c.JSON(http.StatusInternalServerError, "Oops")
}
c.JSON(http.StatusOK, gifts)
})
r.GET("/responses", func(c *gin.Context) {
responses, err := pg.AllGiftResponses()
if err != nil {
Expand Down Expand Up @@ -160,7 +152,7 @@ func (pg *PgController) Serve() *gin.Engine {
}

// Get Body Parameters and put in JSON Object
var input model.Gift;
var input model.Gift
if err := c.BindJSON(&input); err != nil {
c.JSON(http.StatusBadRequest, "Failed to unmarshal gift")
fmt.Print(err)
Expand Down

0 comments on commit 8847a7a

Please sign in to comment.