Signed-off-by: Tiger Wang <tigerwang@outlook.com>
This commit is contained in:
Tiger Wang 2023-04-24 16:10:04 -04:00
parent 4eb35e1d25
commit cab44de09b

View File

@ -74,7 +74,7 @@ func InitV2Router() http.Handler {
// return true
},
ParseTokenFunc: func(token string, c echo.Context) (interface{}, error) {
claims, code := jwt.Validate(token)
claims, code := jwt.Validate(token) // TODO - needs JWT validation
if code != common_err.SUCCESS {
return nil, echo.ErrUnauthorized
}
@ -137,6 +137,7 @@ func InitV2DocRouter(docHTML string, docYAML string) http.Handler {
}
})
}
func InitFile() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
filePath := r.URL.Query().Get("path")