🉑 origin优化

This commit is contained in:
微凉
2021-01-11 16:53:48 +08:00
parent dcebf5257f
commit 858291876b
10 changed files with 70 additions and 43 deletions

View File

@ -6,7 +6,7 @@ import (
)
func Info(c *gin.Context) {
c.JSON(200, dataResponse(conf.Conf.Info))
c.JSON(200, DataResponse(conf.Conf.Info))
}
func RefreshCache(c *gin.Context) {
@ -14,12 +14,12 @@ func RefreshCache(c *gin.Context) {
if conf.Conf.Cache.Enable {
if password == conf.Conf.Cache.RefreshPassword {
conf.Cache.Flush()
c.JSON(200,metaResponse(200,"flush success."))
c.JSON(200, MetaResponse(200,"flush success."))
return
}
c.JSON(200,metaResponse(401,"wrong password."))
c.JSON(200, MetaResponse(401,"wrong password."))
return
}
c.JSON(200,metaResponse(400,"disabled cache."))
c.JSON(200, MetaResponse(400,"disabled cache."))
return
}