feat: add app version

This commit is contained in:
Simon Ding
2024-07-27 15:05:53 +08:00
parent 0433cc7b0a
commit 741a4024fd
6 changed files with 7 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ func (s *Server) authModdleware(c *gin.Context) {
return
}
auth = strings.TrimPrefix(auth, "Bearer ")
//log.Infof("current token: %v", auth)
//log.Debugf("current token: %v", auth)
token, err := jwt.ParseWithClaims(auth, &jwt.RegisteredClaims{}, func(t *jwt.Token) (interface{}, error) {
return []byte(s.jwtSerect), nil
})

View File

@@ -84,5 +84,6 @@ func (s *Server) SuggestedSeriesFolderName(c *gin.Context) (interface{}, error)
if year != "" {
name = fmt.Sprintf("%s (%s)", name, year)
}
log.Infof("tv series of tmdb id %v suggestting name is %v", id, name)
return gin.H{"name": name}, nil
}

View File

@@ -48,5 +48,6 @@ func (s *Server) About(c *gin.Context) (interface{}, error) {
"uptime": uptime.Uptime(),
"chat_group": "https://t.me/+8R2nzrlSs2JhMDgx",
"go_version": runtime.Version(),
"version": db.Version,
}, nil
}