Fix kyc info and data and api handler
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -152,11 +152,10 @@ func (self *KycServiceImpl) QueryKyc(payload *KycQueryPayload) (result *KycQuery
|
||||
}
|
||||
|
||||
var updates = map[string]any{
|
||||
"kyc_info": kycInfo,
|
||||
"kyc_info": encodedKycInfo,
|
||||
}
|
||||
|
||||
err = new(data.Kyc).
|
||||
SetKycInfo(*encodedKycInfo).
|
||||
UpdateByKycID(payload.Context, &kycId, updates)
|
||||
if err != nil {
|
||||
exception := new(exception.Builder).
|
||||
|
||||
@@ -142,12 +142,12 @@ func (self *KycServiceImpl) SessionKyc(payload *KycSessionPayload) (result *KycS
|
||||
SetEndpoint(exception.EndpointKycServiceSession).
|
||||
SetType(exception.TypeSpecific).
|
||||
SetOriginal(exception.KycSessionFailed).
|
||||
SetError(err).
|
||||
SetError(nil).
|
||||
Throw(payload.Context)
|
||||
|
||||
result = &KycSessionResult{
|
||||
Common: shared.CommonResult{
|
||||
HttpCode: 500,
|
||||
HttpCode: 400,
|
||||
Exception: exception,
|
||||
},
|
||||
Data: nil,
|
||||
|
||||
Reference in New Issue
Block a user