mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-26 16:02:18 +08:00
fix: 修正后台钉钉回调域名显示问题
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package gaia
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/gaia"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -18,8 +20,12 @@ type SystemApi struct{}
|
||||
// @Success 200 {object} response.Response{data=gaia.Tenants,msg=string} "查询成功"
|
||||
// @Router /gaia/system/dingtalk [get]
|
||||
func (systemApi *SystemApi) GetDingTalk(c *gin.Context) {
|
||||
var host string
|
||||
var config = make(map[string]interface{})
|
||||
config["host"] = c.Request.Header.Get("Referer")
|
||||
if host, _ = global.GVA_Dify_REDIS.Get(context.Background(), "api_host").Result(); len(host) == 0 {
|
||||
host = global.GVA_CONFIG.Gaia.Url
|
||||
}
|
||||
config["host"] = host
|
||||
config["config"] = systemIntegratedService.GetIntegratedConfig(gaia.SystemIntegrationDingTalk)
|
||||
response.OkWithData(config, c)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package gaia
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
@@ -32,7 +33,11 @@ func (s *SystemOAuth2Api) GetOAuth2Config(c *gin.Context) {
|
||||
configMap.Status = integrated.Status
|
||||
configMap.Classify = integrated.Classify
|
||||
configMap.AppSecret = integrated.AppSecret
|
||||
config["host"] = c.Request.Header.Get("Referer")
|
||||
var host string
|
||||
if host, _ = global.GVA_Dify_REDIS.Get(context.Background(), "api_host").Result(); len(host) == 0 {
|
||||
host = global.GVA_CONFIG.Gaia.Url
|
||||
}
|
||||
config["host"] = host
|
||||
config["config"] = configMap
|
||||
response.OkWithData(config, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user