Skip to content

Commit

Permalink
fix: add header
Browse files Browse the repository at this point in the history
  • Loading branch information
TYuan0816 committed Jun 17, 2024
1 parent 7f58f5f commit 7ec201b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/sbi/processor/ue_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ func (p *Processor) HandleUeAuthPostRequest(c *gin.Context, authenticationInfo m
logger.UeAuthLog.Infof("HandleUeAuthPostRequest")

response, locationURI, problemDetails := p.UeAuthPostRequestProcedure(authenticationInfo)
respHeader := make(http.Header)
respHeader.Set("Location", locationURI)
c.Header("Location", locationURI)

if response != nil {
c.JSON(http.StatusOK, response)
c.JSON(http.StatusCreated, response)
return
} else if problemDetails != nil {
c.JSON(int(problemDetails.Status), problemDetails)
Expand Down Expand Up @@ -883,7 +882,7 @@ func getUdmUrl(nrfUri string) string {
nrfUri,
models.NfType_UDM,
models.NfType_AUSF,
nfDiscoverParam,
&nfDiscoverParam,
)
if err != nil {
logger.UeAuthLog.Errorln("[Search UDM UEAU] ", err.Error())
Expand Down

0 comments on commit 7ec201b

Please sign in to comment.