package discoverservice
import (
+ "fmt"
"net/http"
"oransc.org/nonrtric/capifcore/internal/common29122"
func (ds *DiscoverService) GetAllServiceAPIs(ctx echo.Context, params discoverapi.GetAllServiceAPIsParams) error {
allApis := ds.invokerRegister.GetInvokerApiList(params.ApiInvokerId)
if allApis == nil {
- return sendCoreError(ctx, http.StatusNotFound, "Invoker not registered")
+ return sendCoreError(ctx, http.StatusNotFound, fmt.Sprintf("Invoker %s not registered", params.ApiInvokerId))
}
filteredApis := []publishapi.ServiceAPIDescription{}
gatewayDomain := "r1-expo-func-aef"
}
func checkCommType(resources *[]publishapi.Resource, commType *publishapi.CommunicationType) bool {
- match := false
- if commType != nil {
- for _, resource := range *resources {
- if resource.CommType == *commType {
- match = true
- break
- }
+ for _, resource := range *resources {
+ if resource.CommType == *commType {
+ return true
}
- } else {
- match = true
}
- return match
+ return false
}
// This function wraps sending of an error in the Error format, and