This commit is contained in:
18
internal/routes/notFoundRoute.go
Normal file
18
internal/routes/notFoundRoute.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"history-api/internal/dtos/response"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
func NotFoundRoute(app *fiber.App) {
|
||||
app.Use(
|
||||
func(c fiber.Ctx) error {
|
||||
return c.Status(fiber.StatusNotFound).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: "sorry, endpoint is not found",
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user