f
This commit is contained in:
@@ -370,10 +370,9 @@ func extractParentAccessID(params map[string]interface{}) (string, bool) {
|
||||
|
||||
// callExternalApi 同步调用外部API
|
||||
func (s *ApiApplicationServiceImpl) callExternalApi(ctx context.Context, cmd *commands.ApiCallCommand, validation *dto.ApiCallValidationResult) (string, error) {
|
||||
// 查询白名单拦截:命中则返回「查询为空」,不调用上游、不扣费
|
||||
if s.queryWhitelistSvc != nil &&
|
||||
s.queryWhitelistSvc.ShouldReturnEmpty(ctx, validation.GetUserID(), cmd.ApiName, validation.RequestParams) {
|
||||
return "", ErrQueryEmpty
|
||||
// 查询白名单:应用层判断入参是否命中,并将命中的 api_codes 写入 context
|
||||
if s.queryWhitelistSvc != nil {
|
||||
ctx = s.queryWhitelistSvc.EnrichContext(ctx, validation.GetUserID(), validation.RequestParams)
|
||||
}
|
||||
|
||||
// 创建CallContext
|
||||
|
||||
Reference in New Issue
Block a user