Skip to content

Commit

Permalink
refactor: align naming of route handler
Browse files Browse the repository at this point in the history
  • Loading branch information
yccodr committed May 9, 2024
1 parent 7f4cf20 commit b00f843
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/sbi/api_nssaiavailability.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func (s *Server) getNssaiAvailabilityRoutes() []Route {
strings.ToUpper("Delete"),
// "/nssai-availability/subscriptions/:subscriptionId",
"/nssai-availability/:nfId/:subscriptionId",
s.Processor().HTTPNSSAIAvailabilityUnsubscribe,
s.Processor().HandleNSSAIAvailabilityUnsubscribeDelete,
},

{
"NSSAIAvailabilityPost",
strings.ToUpper("Post"),
"/nssai-availability/subscriptions",
s.Processor().HTTPNSSAIAvailabilityPost,
s.Processor().HandleNSSAIAvailabilityPost,
},
}
}
2 changes: 1 addition & 1 deletion internal/sbi/processor/subscription_id_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/free5gc/util/httpwrapper"
)

func (p *Processor) HTTPNSSAIAvailabilityUnsubscribe(c *gin.Context) {
func (p *Processor) HandleNSSAIAvailabilityUnsubscribeDelete(c *gin.Context) {
// Due to conflict of route matching, 'subscriptions' in the route is replaced with the existing wildcard ':nfId'
nfID := c.Param("nfId")
if nfID != "subscriptions" {
Expand Down
2 changes: 1 addition & 1 deletion internal/sbi/processor/subscriptions_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
. "github.com/free5gc/openapi/models"
)

func (p *Processor) HTTPNSSAIAvailabilityPost(c *gin.Context) {
func (p *Processor) HandleNSSAIAvailabilityPost(c *gin.Context) {
var createData NssfEventSubscriptionCreateData

requestBody, err := c.GetRawData()
Expand Down

0 comments on commit b00f843

Please sign in to comment.