Skip to content

Commit 0cd70dc

Browse files
committed
feat: controller domain returns domain_id
1 parent b22b0f3 commit 0cd70dc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

server/controller/http/service/resource/domain.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ func GetDomains(orgDB *mysql.DB, excludeTeamIDs []int, filter map[string]interfa
243243
CreatedAt: domain.CreatedAt.Format(common.GO_BIRTHDAY),
244244
SyncedAt: syncedAt,
245245
Lcuuid: domain.Lcuuid,
246+
DomainID: domain.ID,
246247
}
247248

248249
if _, ok := domainToRegionLcuuidsToAZLcuuids[domain.Lcuuid]; ok {
@@ -796,6 +797,7 @@ func GetSubDomains(orgDB *mysql.DB, excludeTeamIDs []int, filter map[string]inte
796797
SyncedAt: syncedAt,
797798
Domain: subDomain.Domain,
798799
Lcuuid: subDomain.Lcuuid,
800+
SubDomainID: subDomain.ID,
799801
}
800802

801803
subDomainResp.Config = make(map[string]interface{})

server/controller/model/model.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ type Domain struct {
337337
CreatedAt string `json:"CREATED_AT"`
338338
SyncedAt string `json:"SYNCED_AT"`
339339
Lcuuid string `json:"LCUUID"`
340+
DomainID int `json:"DOMAIN_ID"`
340341
}
341342

342343
type DomainCreate struct {
@@ -375,6 +376,7 @@ type SubDomain struct {
375376
SyncedAt string `json:"SYNCED_AT"`
376377
Lcuuid string `json:"LCUUID"`
377378
DomainName string `json:"DOMAIN_NAME"`
379+
SubDomainID int `json:"SUB_DOMAIN_ID"`
378380
}
379381

380382
type SubDomainCreate struct {

0 commit comments

Comments
 (0)