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 and Alonza0314 committed Jan 2, 2025
1 parent fcdb10b commit e2aa3ac
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 @@ -194,8 +194,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 e2aa3ac

Please sign in to comment.