fix: fix some bugs (#17)

This commit is contained in:
Li4n0
2021-05-18 22:45:18 +08:00
committed by GitHub
parent 5b63e90390
commit bc6e3962f8
23 changed files with 151 additions and 121 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ import (
func auth(c *gin.Context) {
c.SetSameSite(http.SameSiteLaxMode)
c.SetCookie("token", c.Request.Header["Token"][0], 0, "/revsuit/api/", c.Request.Host, true, true)
c.SetCookie("token", c.Request.Header["Token"][0], 0, "/revsuit/api/", "", false, true)
c.String(200, "pong")
}
+2 -2
View File
@@ -14,7 +14,7 @@ import (
log "unknwon.dev/clog/v2"
)
const VERSION = "Beta0.1"
const VERSION = "0.1.1-beta"
type Revsuit struct {
config *Config
@@ -97,7 +97,7 @@ func initLog(level string) (logLevel log.Level) {
database.DB.Logger.LogMode(logger.Info)
logLevel = log.LevelTrace
case "info":
gin.SetMode(gin.DebugMode)
gin.SetMode(gin.ReleaseMode)
database.DB.Logger.LogMode(logger.Info)
logLevel = log.LevelInfo
case "warning", "warn":