v1.2.0: back: use health skip from lib
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
41563e9256
commit
0ad1626bdb
1 changed files with 3 additions and 8 deletions
11
cmd/main.go
11
cmd/main.go
|
|
@ -9,6 +9,7 @@ import (
|
|||
echoSwagger "github.com/swaggo/echo-swagger"
|
||||
logins "gitlab.g3e.fr/h6n/users/internal"
|
||||
"gitlab.g3e.fr/h6n/users/lib"
|
||||
"gitlab.g3e.fr/h6n/users/lib/health"
|
||||
"gorm.io/gorm"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
|
|
@ -58,20 +59,14 @@ func skip_auth(c echo.Context) bool {
|
|||
if c.Request().Method == "POST" && c.Path() == "/" {
|
||||
return true
|
||||
}
|
||||
if c.Request().Method == "GET" && c.Path() == "/health" {
|
||||
return true
|
||||
}
|
||||
if len(c.Path()) > 9 && c.Path()[:9] == "/swagger/" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return health.IsHealth(c)
|
||||
}
|
||||
|
||||
func skip_log(c echo.Context) bool {
|
||||
if c.Request().Method == "GET" && c.Path() == "/health" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return health.IsHealth(c)
|
||||
}
|
||||
|
||||
// @title Users
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue