From 199379b02bf38f60476523a5c86a48053f9a9990 Mon Sep 17 00:00:00 2001 From: "Julian V." <11302774+TheFunctionalGuy@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:26:10 +0100 Subject: [PATCH] fix: restore intended behavior of nnrf-nfm/v1/nf-instances endpoint (#48) 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. --- internal/sbi/api_nfmanagement.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/sbi/api_nfmanagement.go b/internal/sbi/api_nfmanagement.go index cd0889e..8143d3a 100644 --- a/internal/sbi/api_nfmanagement.go +++ b/internal/sbi/api_nfmanagement.go @@ -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{