mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 16:33:08 +00:00
As lightpush/filter clients are always mounted and can handle service peers from other sources there no reason to restrict respective REST endpoints availability connected to filternode and lightpushnode cli arguments - they can help but not mandatory to access filter and lightush clients (#3331)
This commit is contained in:
parent
7809dd69ac
commit
8876c2fc18
@ -148,7 +148,7 @@ proc startRestServerProtocolSupport*(
|
|||||||
"/relay endpoints are not available. Please check your configuration: --relay"
|
"/relay endpoints are not available. Please check your configuration: --relay"
|
||||||
|
|
||||||
## Filter REST API
|
## Filter REST API
|
||||||
if conf.filternode != "" and node.wakuFilterClient != nil:
|
if node.wakuFilterClient != nil:
|
||||||
let filterCache = MessageCache.init()
|
let filterCache = MessageCache.init()
|
||||||
|
|
||||||
let filterDiscoHandler =
|
let filterDiscoHandler =
|
||||||
@ -161,8 +161,7 @@ proc startRestServerProtocolSupport*(
|
|||||||
router, node, filterCache, filterDiscoHandler
|
router, node, filterCache, filterDiscoHandler
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
restServerNotInstalledTab["filter"] =
|
restServerNotInstalledTab["filter"] = "/filter endpoints are not available."
|
||||||
"/filter endpoints are not available. Please check your configuration: --filternode"
|
|
||||||
|
|
||||||
## Store REST API
|
## Store REST API
|
||||||
let storeDiscoHandler =
|
let storeDiscoHandler =
|
||||||
@ -175,9 +174,10 @@ proc startRestServerProtocolSupport*(
|
|||||||
rest_store_legacy_api.installStoreApiHandlers(router, node, storeDiscoHandler)
|
rest_store_legacy_api.installStoreApiHandlers(router, node, storeDiscoHandler)
|
||||||
|
|
||||||
## Light push API
|
## Light push API
|
||||||
## Install it either if lightpushnode (lightpush service node) is configured and client is mounted)
|
## Install it either if client is mounted)
|
||||||
## or install it to be used with self-hosted lightpush service
|
## or install it to be used with self-hosted lightpush service
|
||||||
if (conf.lightpushnode != "" and node.wakuLegacyLightpushClient != nil) or
|
## We either get lightpushnode (lightpush service node) from config or discovered or self served
|
||||||
|
if (node.wakuLegacyLightpushClient != nil) or
|
||||||
(conf.lightpush and node.wakuLegacyLightPush != nil and node.wakuRelay != nil):
|
(conf.lightpush and node.wakuLegacyLightPush != nil and node.wakuRelay != nil):
|
||||||
let lightDiscoHandler =
|
let lightDiscoHandler =
|
||||||
if not wakuDiscv5.isNil():
|
if not wakuDiscv5.isNil():
|
||||||
@ -190,8 +190,7 @@ proc startRestServerProtocolSupport*(
|
|||||||
)
|
)
|
||||||
rest_lightpush_api.installLightPushRequestHandler(router, node, lightDiscoHandler)
|
rest_lightpush_api.installLightPushRequestHandler(router, node, lightDiscoHandler)
|
||||||
else:
|
else:
|
||||||
restServerNotInstalledTab["lightpush"] =
|
restServerNotInstalledTab["lightpush"] = "/lightpush endpoints are not available."
|
||||||
"/lightpush endpoints are not available. Please check your configuration: --lightpushnode"
|
|
||||||
|
|
||||||
info "REST services are installed"
|
info "REST services are installed"
|
||||||
return ok()
|
return ok()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user