From 65496da46c3dee7defffe02f8180651298047d41 Mon Sep 17 00:00:00 2001 From: chh Date: Thu, 24 Oct 2024 08:59:49 +0000 Subject: [PATCH] style: change GetAccessAndMobilityPolicyData return --- internal/sbi/consumer/udr_service.go | 6 +++--- internal/sbi/processor/ampolicy.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/sbi/consumer/udr_service.go b/internal/sbi/consumer/udr_service.go index c3041ee..0f3b0d0 100644 --- a/internal/sbi/consumer/udr_service.go +++ b/internal/sbi/consumer/udr_service.go @@ -185,7 +185,7 @@ func (s *nudrService) GetBdtData(uri string, bdtRefId string) ( } func (s *nudrService) GetAccessAndMobilityPolicyData(ue *pcf_context.UeContext) ( - resp *DataRepository.ReadAccessAndMobilityPolicyDataResponse, + amPolicyData *models.AmPolicyData, problemDetails *models.ProblemDetails, err error, ) { if ue.Supi == "" { @@ -211,9 +211,9 @@ func (s *nudrService) GetAccessAndMobilityPolicyData(ue *pcf_context.UeContext) param := DataRepository.ReadAccessAndMobilityPolicyDataRequest{ UeId: &ue.Supi, } - resp, err = client.AccessAndMobilityPolicyDataDocumentApi.ReadAccessAndMobilityPolicyData(ctx, ¶m) + resp, err := client.AccessAndMobilityPolicyDataDocumentApi.ReadAccessAndMobilityPolicyData(ctx, ¶m) if err == nil { - return resp, nil, nil + return &resp.AmPolicyData, nil, nil } problem := err.(openapi.GenericOpenAPIError).Model().(models.ProblemDetails) problemDetails = &problem diff --git a/internal/sbi/processor/ampolicy.go b/internal/sbi/processor/ampolicy.go index 3a3d950..3e86917 100644 --- a/internal/sbi/processor/ampolicy.go +++ b/internal/sbi/processor/ampolicy.go @@ -234,7 +234,7 @@ func (p *Processor) PostPoliciesProcedure(polAssoId string, if amPolicy == nil { amPolicy = ue.NewUeAMPolicyData(assolId, policyAssociationRequest) } - amPolicy.AmPolicyData = &rsp.AmPolicyData + amPolicy.AmPolicyData = rsp } // TODO: according to PCF Policy to determine ServAreaRes, Rfsp, SuppFeat