Fix swagger data struct error
Some checks failed
Backend Check Build (NixCN CMS) TeamCity build failed
Client CMS Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-29 01:25:12 +08:00
parent f7bde8ef2e
commit 654b196bfd
15 changed files with 136 additions and 316 deletions

View File

@@ -20,11 +20,13 @@ type CheckinPayload struct {
Data *CheckinData
}
type CheckinResponse struct {
CheckinCode *string `json:"checkin_code"`
}
type CheckinResult struct {
Common shared.CommonResult
Data *struct {
CheckinCode *string `json:"checkin_code"`
}
Data *CheckinResponse
}
func (self *EventServiceImpl) Checkin(payload *CheckinPayload) (result *CheckinResult) {
@@ -44,6 +46,7 @@ func (self *EventServiceImpl) Checkin(payload *CheckinPayload) (result *CheckinR
Throw(payload.Context),
},
}
return
}
@@ -58,10 +61,9 @@ func (self *EventServiceImpl) Checkin(payload *CheckinPayload) (result *CheckinR
SetOriginal(exception.CommonSuccess).
Throw(payload.Context),
},
Data: &struct {
CheckinCode *string `json:"checkin_code"`
}{code},
Data: &CheckinResponse{code},
}
return
}
@@ -123,11 +125,13 @@ type CheckinQueryPayload struct {
Data *CheckinQueryData
}
type CheckinQueryResponse struct {
CheckinAt *time.Time `json:"checkin_at"`
}
type CheckinQueryResult struct {
Common shared.CommonResult
Data *struct {
CheckinAt *time.Time `json:"checkin_at"`
}
Data *CheckinQueryResponse
}
func (self *EventServiceImpl) CheckinQuery(payload *CheckinQueryPayload) (result *CheckinQueryResult) {
@@ -183,9 +187,7 @@ func (self *EventServiceImpl) CheckinQuery(payload *CheckinQueryPayload) (result
SetOriginal(exception.CommonSuccess).
Throw(payload.Context),
},
Data: &struct {
CheckinAt *time.Time `json:"checkin_at"`
}{checkinAt},
Data: &CheckinQueryResponse{checkinAt},
}
return
}