add 404 route

This commit is contained in:
Jeffrey Paul 2019-11-11 15:29:56 -08:00
parent 6c6c0e9bdb
commit 0bd6a82d33
1 changed files with 4 additions and 0 deletions

View File

@ -152,6 +152,10 @@ func (ms *Server) setupRoutes() {
r.GET("/get/latest/merps", tollbooth_gin.LimitHandler(limiter), ms.getLatestMerps())
r.GET("/get/merps/for/:thing", tollbooth_gin.LimitHandler(limiter), ms.getLatestMerps())
r.NoRoute(func(c *gin.Context) {
c.JSON(404, gin.H{"message": "not found"})
})
ms.gin = r
}