|
@@ -443,7 +443,7 @@ func AppletUnauthorized(c *gin.Context) { |
|
|
// @Router /api/setCenter/share/index [GET] |
|
|
// @Router /api/setCenter/share/index [GET] |
|
|
func ShareIndex(c *gin.Context) { |
|
|
func ShareIndex(c *gin.Context) { |
|
|
masterId := svc.GetMasterId(c) |
|
|
masterId := svc.GetMasterId(c) |
|
|
userAppDomainDb := implement.NewUserAppDomainDb(db.DBs[masterId]) |
|
|
|
|
|
|
|
|
userAppDomainDb := implement.NewUserAppDomainDb(db.Db) |
|
|
agent, err := userAppDomainDb.GetAppDomainByType("agent", masterId) |
|
|
agent, err := userAppDomainDb.GetAppDomainByType("agent", masterId) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
@@ -454,10 +454,18 @@ func ShareIndex(c *gin.Context) { |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
agentDomain := "" |
|
|
|
|
|
if agent != nil { |
|
|
|
|
|
agentDomain = agent.Domain |
|
|
|
|
|
} |
|
|
|
|
|
mediumDomain := "" |
|
|
|
|
|
if medium != nil { |
|
|
|
|
|
mediumDomain = medium.Domain |
|
|
|
|
|
} |
|
|
e.OutSuc(c, md.ShareIndexResp{ |
|
|
e.OutSuc(c, md.ShareIndexResp{ |
|
|
MasterId: masterId, |
|
|
MasterId: masterId, |
|
|
AgentDomain: agent.Domain, |
|
|
|
|
|
MediumDomain: medium.Domain, |
|
|
|
|
|
|
|
|
AgentDomain: agentDomain, |
|
|
|
|
|
MediumDomain: mediumDomain, |
|
|
}, nil) |
|
|
}, nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|