Commit 710cab86 authored by Yann Garcia's avatar Yann Garcia
Browse files

Fix lint issues & remove useless logs

parent cf4ddf46
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -681,7 +681,7 @@ func appRegistrationPOST(w http.ResponseWriter, r *http.Request) {
		return
	}

	if !appInfo.IsInsByMec && appInfo.Endpoint == nil {
	if appInfo.IsInsByMec == false && appInfo.Endpoint == nil {
		log.Error("Shall be present when IsInsByMec is FALSE")
		errHandlerProblemDetails(w, "Endpoint shall be present when IsInsByMec is FALSE.", http.StatusBadRequest)
		return
@@ -827,7 +827,7 @@ func appRegistrationPUT(w http.ResponseWriter, r *http.Request) {
		return
	}

	if !appInfoPut.IsInsByMec && appInfoPut.Endpoint == nil {
	if appInfoPut.IsInsByMec == false && appInfoPut.Endpoint == nil {
		log.Error("Shall be present when IsInsByMec is FALSE")
		errHandlerProblemDetails(w, "Shall be present when IsInsByMec is FALSE.", http.StatusBadRequest)
		return
+7 −8
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import (
	"sync"
	"time"

	as "github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-app-enablement/server/app-support"
	dkm "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr"
	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
	mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq"
@@ -828,9 +829,9 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {
	}

	// Create subscription link list
	subscriptionLinkList := &MecServiceMgmtApiSubscriptionLinkList{
		Links: &MecServiceMgmtApiSubscriptionLinkListLinks{
			Self: &LinkType{
	subscriptionLinkList := &as.SubscriptionLinkList{
		Links: &as.SubscriptionLinkListLinks{
			Self: &as.LinkType{
				Href: hostUrl.String() + basePath + "applications/" + appId + "/subscriptions",
			},
		},
@@ -838,9 +839,9 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {

	for _, sub := range subList {
		// Create subscription reference & append it to link list
		subscription := MecServiceMgmtApiSubscriptionLinkListSubscription{
			Rel:  SER_AVAILABILITY_NOTIF_SUB_TYPE,
		subscription := as.SubscriptionLinkListSubscription{
			Href:             sub.Cfg.Self,
			SubscriptionType: &sub.Cfg.Type,
		}
		subscriptionLinkList.Links.Subscriptions = append(subscriptionLinkList.Links.Subscriptions, subscription)
	}
@@ -1129,8 +1130,6 @@ func getService(w http.ResponseWriter, r *http.Request, appId string, serviceId
	}

	// Validate result
	log.Info("Service: ", sInfoList.Services)          // FIXME To be removed
	log.Info("Service len: ", len(sInfoList.Services)) // FIXME To be removed
	if len(sInfoList.Services) == 0 {
		w.WriteHeader(http.StatusNotFound)
		return