Fix service_event nil kycid
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-02-08 17:07:33 +08:00
parent e7df62e673
commit 79ccd0036e
2 changed files with 58 additions and 1 deletions

View File

@@ -205,6 +205,26 @@ func (self *EventServiceImpl) JoinEvent(payload *EventJoinPayload) (result *Even
}
attendenceData.SetRole("normal")
if payload.Data.KycId != "" {
kycUUID, err := uuid.Parse(payload.Data.KycId)
if err != nil {
return &EventJoinResult{
Common: shared.CommonResult{
HttpCode: 400,
Exception: new(exception.Builder).
SetStatus(exception.StatusUser).
SetService(exception.ServiceEvent).
SetEndpoint(exception.EndpointEventServiceJoin).
SetType(exception.TypeCommon).
SetOriginal(exception.CommonErrorUuidParseFailed).
SetError(err).
Throw(payload.Context),
},
}
}
attendenceData.SetKycId(kycUUID)
}
attendanceId, err := attendenceData.Create(payload.Context)
if err != nil {
return &EventJoinResult{