Resolve RMR port from K8s services
[ric-plt/appmgr.git] / pkg / resthooks / resthooks.go
index 471eec1..dea70c9 100755 (executable)
@@ -22,14 +22,14 @@ package resthooks
 import (
        "bytes"
        "encoding/json"
-       sdl "gerrit.oran-osc.org/r/ric-plt/sdlgo"
+       sdl "gerrit.o-ran-sc.org/r/ric-plt/sdlgo"
        cmap "github.com/orcaman/concurrent-map"
        "github.com/segmentio/ksuid"
        "net/http"
        "time"
 
-       "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr"
-       "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models"
+       "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr"
+       "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models"
 )
 
 func NewResthook(restoreData bool) *Resthook {
@@ -51,7 +51,8 @@ func (rh *Resthook) AddSubscription(sr models.SubscriptionRequest) *models.Subsc
                r := v.Val.(SubscriptionInfo).req
                if *r.Data.TargetURL == *sr.Data.TargetURL && r.Data.EventType == sr.Data.EventType {
                        appmgr.Logger.Info("Similar subscription already exists!")
-                       return &models.SubscriptionResponse{}
+                       resp := v.Val.(SubscriptionInfo).resp
+                       return &resp
                }
        }