2016-04-03 17:59:27 +00:00
|
|
|
package v1
|
|
|
|
|
|
|
|
import (
|
2017-01-14 17:06:16 +00:00
|
|
|
"zxq.co/ripple/rippleapi/common"
|
2016-04-03 17:59:27 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
2016-04-16 16:05:24 +00:00
|
|
|
type response404 struct {
|
|
|
|
common.ResponseBase
|
|
|
|
Cats string `json:"cats"`
|
|
|
|
}
|
|
|
|
|
2016-04-03 17:59:27 +00:00
|
|
|
// Handle404 handles requests with no implemented handlers.
|
|
|
|
func Handle404(c *gin.Context) {
|
2016-07-12 17:55:58 +00:00
|
|
|
c.Header("X-Real-404", "yes")
|
2016-04-16 16:05:24 +00:00
|
|
|
c.IndentedJSON(404, response404{
|
|
|
|
ResponseBase: common.ResponseBase{
|
2016-06-13 19:47:35 +00:00
|
|
|
Code: 404,
|
2016-04-16 16:05:24 +00:00
|
|
|
},
|
|
|
|
Cats: surpriseMe(),
|
2016-04-03 17:59:27 +00:00
|
|
|
})
|
|
|
|
}
|