Skip to content

Commit 2dd67a5

Browse files
committed
chore: rename fields in olares info API
1 parent f626544 commit 2dd67a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/apis/backend/v1/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ func (h *Handler) handleOlaresInfo(req *restful.Request, resp *restful.Response)
403403
}
404404

405405
tInfo := OlaresInfo{}
406-
tInfo.OlaresName = userOp.GetTerminusName(user)
406+
tInfo.OlaresID = userOp.GetTerminusName(user)
407407

408408
status := userOp.GetTerminusStatus(user)
409409
if status == "" {
@@ -432,7 +432,7 @@ func (h *Handler) handleOlaresInfo(req *restful.Request, resp *restful.Response)
432432
return
433433
}
434434

435-
tInfo.OlaresID = terminusId
435+
tInfo.ID = terminusId
436436

437437
var denyAllAnno string = userOp.GetDenyAllPolicy(user)
438438
if denyAllAnno == "" {

pkg/apis/backend/v1/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ type TerminusInfo struct {
4343
}
4444

4545
type OlaresInfo struct {
46-
OlaresName string `json:"olaresName"`
46+
OlaresID string `json:"olaresId"`
4747
WizardStatus constants.WizardStatus `json:"wizardStatus"`
4848
EnableReverseProxy bool `json:"enableReverseProxy"`
4949
TailScaleEnable bool `json:"tailScaleEnable"`
5050
OsVersion string `json:"osVersion"`
5151
LoginBackground string `json:"loginBackground"`
5252
Avatar string `json:"avatar"`
53-
OlaresID string `json:"olaresId"`
53+
ID string `json:"id"`
5454
UserDID string `json:"did"`
5555
Olaresd string `json:"olaresd"`
5656
}

0 commit comments

Comments
 (0)