Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ranim-n committed Sep 9, 2024
1 parent 5236964 commit d928b62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ class SubscriptionService(

fun getContextsLink(subscription: Subscription): String {
val contextLink = when {
subscription.contexts.size > 1 && subscription.jsonldContext == null -> {
subscription.jsonldContext != null -> subscription.jsonldContext.toString()
subscription.contexts.size > 1 -> {
val linkToRetrieveContexts = subscriptionProperties.stellioUrl +
"/ngsi-ld/v1/subscriptions/${subscription.id}/context"
linkToRetrieveContexts
}
subscription.jsonldContext != null -> subscription.jsonldContext.toString()
else -> subscription.contexts[0]
}
return buildContextLinkHeader(contextLink)
Expand Down

0 comments on commit d928b62

Please sign in to comment.