refactor: use config field to save config

This commit is contained in:
JustSong
2024-02-18 02:22:50 +08:00
parent 1aa374ccfb
commit de9a58ca0b
9 changed files with 43 additions and 15 deletions

View File

@@ -246,7 +246,7 @@ func getXunfeiAuthUrl(c *gin.Context, apiKey string, apiSecret string) (string,
query := c.Request.URL.Query()
apiVersion := query.Get("api-version")
if apiVersion == "" {
apiVersion = c.GetString("api_version")
apiVersion = c.GetString(common.ConfigKeyAPIVersion)
}
if apiVersion == "" {
apiVersion = "v1.1"