Fix routing in frontend not working (#723)

This commit is contained in:
gadotroee
2022-01-31 10:49:44 +02:00
committed by GitHub
parent 0abd7c06ff
commit 4be7164f20
2 changed files with 14 additions and 27 deletions

View File

@@ -1,18 +0,0 @@
package routes
import (
"github.com/gin-gonic/gin"
"net/http"
)
// NotFoundRoute defines the 404 Error route.
func NotFoundRoute(app *gin.Engine) {
app.Use(
func(c *gin.Context) {
c.JSON(http.StatusNotFound, map[string]interface{}{
"error": true,
"msg": "sorry, endpoint is not found",
})
},
)
}