Skip to content

Commit 094c252

Browse files
ziddah edemziddah edem
authored andcommitted
updated
1 parent 2be2a3a commit 094c252

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/server/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,10 @@ func main() {
5959
})
6060

6161
AuthRoutes.AuthRoute(router)
62+
63+
server.NoRoute(func(ctx *gin.Context) {
64+
ctx.JSON(http.StatusNotFound, gin.H{"status": "fail", "message": fmt.Sprintf("Route %s not found", ctx.Request.URL)})
65+
})
66+
6267
log.Fatal(server.Run(":" + config.Port))
6368
}

0 commit comments

Comments
 (0)