mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-01 02:10:15 +00:00
feat: replace hardcoded relay URL with config variable
This commit replaces hardcoded relay server URL with a configuration variable in services.php. The relay URL is now fetched from the environment variable NOSTR_RELAY. This change has been made in the files Election:year.blade.php and admin/Election:year.blade.php under association/election directory.
This commit is contained in:
@@ -126,7 +126,7 @@ $loadEvents = function () {
|
||||
$requestMessage = new RequestMessage($subscriptionId, $filters);
|
||||
|
||||
$relays = [
|
||||
new Relay('ws://relay:7000'),
|
||||
new Relay(config('services.relay')),
|
||||
];
|
||||
$relaySet = new RelaySet();
|
||||
$relaySet->setRelays($relays);
|
||||
@@ -134,7 +134,7 @@ $loadEvents = function () {
|
||||
$request = new Request($relaySet, $requestMessage);
|
||||
$response = $request->send();
|
||||
|
||||
$this->events = collect($response['ws://relay:7000'])
|
||||
$this->events = collect($response[config('services.relay')])
|
||||
->map(fn($event)
|
||||
=> [
|
||||
'id' => $event->event->id,
|
||||
|
||||
Reference in New Issue
Block a user