Created
March 27, 2018 13:28
-
-
Save depado/957bff4e83d16c245d42c03059887406 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func random(c *gin.Context, dfr *df.Request) { | |
var err error | |
var d *cocktail.FullDrink | |
if d, err = cocktail.C.GetRandomDrink(); err != nil { | |
logrus.WithError(err).Error("Coudln't get random drink") | |
c.AbortWithStatus(http.StatusInternalServerError) | |
return | |
} | |
fmt.Println(d) | |
c.JSON(http.StatusOK, gin.H{}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment