healthy
ci/woodpecker/push/build Pipeline failed
Details
ci/woodpecker/push/build Pipeline failed
Details
This commit is contained in:
parent
587f049c1c
commit
0f64e03181
|
@ -22,6 +22,10 @@ func (c CategoryController) Show(ctx *gin.Context) {
|
||||||
urlPath := ""
|
urlPath := ""
|
||||||
urlPath = ctx.Request.URL.Path
|
urlPath = ctx.Request.URL.Path
|
||||||
//fmt.Println(urlPath)
|
//fmt.Println(urlPath)
|
||||||
|
if "/healthy" == urlPath {
|
||||||
|
ctx.Writer.WriteString("ok")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(urlPath, "/static") {
|
if strings.HasPrefix(urlPath, "/static") {
|
||||||
if _, err := os.Stat("." + urlPath); err == nil {
|
if _, err := os.Stat("." + urlPath); err == nil {
|
||||||
|
@ -32,10 +36,7 @@ func (c CategoryController) Show(ctx *gin.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootDir := viper.GetString("dir.root")
|
rootDir := viper.GetString("dir.root")
|
||||||
message := template.HTML("")
|
message := template.HTML(viper.GetString("message"))
|
||||||
if "" != viper.GetString("message") {
|
|
||||||
message = template.HTML(viper.GetString("message"))
|
|
||||||
}
|
|
||||||
path := rootDir + urlPath
|
path := rootDir + urlPath
|
||||||
pathInfo, err := os.Stat(path)
|
pathInfo, err := os.Stat(path)
|
||||||
listResult := util.GetFileList(path)
|
listResult := util.GetFileList(path)
|
||||||
|
|
Loading…
Reference in New Issue