mirror of
https://github.com/linux-do/new-api.git
synced 2025-12-26 08:35:58 +08:00
fix: fix gemini
This commit is contained in:
@@ -57,7 +57,7 @@ func GenRelayInfo(c *gin.Context) *RelayInfo {
|
||||
info.BaseUrl = common.ChannelBaseURLs[channelType]
|
||||
}
|
||||
if info.ChannelType == common.ChannelTypeAzure {
|
||||
info.ApiVersion = GetAzureAPIVersion(c)
|
||||
info.ApiVersion = GetAPIVersion(c)
|
||||
}
|
||||
return info
|
||||
}
|
||||
|
||||
@@ -66,12 +66,3 @@ func GetAPIVersion(c *gin.Context) string {
|
||||
}
|
||||
return apiVersion
|
||||
}
|
||||
|
||||
func GetAzureAPIVersion(c *gin.Context) string {
|
||||
query := c.Request.URL.Query()
|
||||
apiVersion := query.Get("api-version")
|
||||
if apiVersion == "" {
|
||||
apiVersion = c.GetString("api_version")
|
||||
}
|
||||
return apiVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user