File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ type OllamaBindDomainReq struct {
3636}
3737
3838type OllamaBindDomainRes struct {
39- Domain string `json:"domain"`
40- SSLID uint `json:"sslID"`
41- AllowIPs []string `json:"allowIPs"`
42- WebsiteID uint `json:"websiteID"`
43- ConnUrl string `json:"connUrl"`
39+ Domain string `json:"domain"`
40+ SSLID uint `json:"sslID"`
41+ AcmeAccountID uint `json:"acmeAccountID"`
42+ AllowIPs []string `json:"allowIPs"`
43+ WebsiteID uint `json:"websiteID"`
44+ ConnUrl string `json:"connUrl"`
4445}
Original file line number Diff line number Diff line change @@ -297,6 +297,8 @@ func (u *AIToolService) GetBindDomain(req dto.OllamaBindDomainReq) (*dto.OllamaB
297297 res .Domain = website .PrimaryDomain
298298 if website .WebsiteSSLID > 0 {
299299 res .SSLID = website .WebsiteSSLID
300+ ssl , _ := websiteSSLRepo .GetFirst (commonRepo .WithByID (website .WebsiteSSLID ))
301+ res .AcmeAccountID = ssl .AcmeAccountID
300302 }
301303 res .ConnUrl = fmt .Sprintf ("%s://%s" , strings .ToLower (website .Protocol ), website .PrimaryDomain )
302304 res .AllowIPs = GetAllowIps (website )
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export namespace AI {
104104 export interface BindDomainRes {
105105 domain : string ;
106106 sslID : number ;
107+ acmeAccountID : number ;
107108 allowIPs : string [ ] ;
108109 websiteID ?: number ;
109110 connUrl : string ;
Original file line number Diff line number Diff line change @@ -202,9 +202,6 @@ const listSSL = () => {
202202const listAcmeAccount = () => {
203203 SearchAcmeAccount ({ page: 1 , pageSize: 100 }).then ((res ) => {
204204 acmeAccounts .value = res .data .items || [];
205- if (acmeAccounts .value .length > 0 ) {
206- req .value .acmeAccountID = acmeAccounts .value [0 ].id ;
207- }
208205 listSSL ();
209206 });
210207};
@@ -238,6 +235,7 @@ const search = async (appInstallID: number) => {
238235 if (res .data .sslID > 0 ) {
239236 req .value .enableSSL = true ;
240237 req .value .sslID = res .data .sslID ;
238+ req .value .acmeAccountID = res .data .acmeAccountID ;
241239 listAcmeAccount ();
242240 }
243241 }
You can’t perform that action at this time.
0 commit comments