Skip to content

Commit

Permalink
fix: restore intended behavior of nnrf-nfm/v1/nf-instances endpoint (#48
Browse files Browse the repository at this point in the history
)

The nnrf-nfm/v1/nf-instances endpoint tried to get request query
parameters by extracting the from the request path using
c.Params.ByName.

This resulted in empty results for nfType and limitParam and thus always
returned 400 on every request.
  • Loading branch information
TheFunctionalGuy authored Dec 17, 2024
1 parent 0d3f451 commit 199379b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/sbi/api_nfmanagement.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ func (s *Server) HTTPUpdateNFInstance(c *gin.Context) {

// GetNFInstances - Retrieves a collection of NF Instances
func (s *Server) HTTPGetNFInstances(c *gin.Context) {
nfType := c.Params.ByName("nf-type")
limitParam := c.Params.ByName("limit")
nfType := c.Query("nf-type")
limitParam := c.Query("limit")

if nfType == "" || limitParam == "" {
problemDetail := &models.ProblemDetails{
Expand Down

0 comments on commit 199379b

Please sign in to comment.