refactor: support AbortWithStatusJSON (#200)

This commit is contained in:
Bo-Yi Wu
2017-03-29 09:21:31 +08:00
committed by GitHub
parent d94c9437f5
commit 5b2b3695e5
67 changed files with 55188 additions and 128 deletions

View File

@@ -17,11 +17,10 @@ func init() {
}
func abortWithError(c *gin.Context, code int, message string) {
c.JSON(code, gin.H{
c.AbortWithStatusJSON(code, gin.H{
"code": code,
"message": message,
})
c.Abort()
}
func rootHandler(c *gin.Context) {