feat: remove error check in response for election pages

Remove the error check in the response of the election pages in the admin and user interface. This was causing unnecessary aborts.
This commit is contained in:
fsociety
2024-09-29 22:12:57 +02:00
parent 2f8ef6c662
commit 8b87669eb6
2 changed files with 0 additions and 14 deletions

View File

@@ -94,13 +94,6 @@ $loadEvents = function () {
$request = new Request($relaySet, $requestMessage); $request = new Request($relaySet, $requestMessage);
$response = $request->send(); $response = $request->send();
// Check for errors in the response
if (isset($response[config('services.relay')][0][0]) && $response[config(
'services.relay'
)][0][0] === 'ERROR') {
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
}
$this->events = collect($response[config('services.relay')]) $this->events = collect($response[config('services.relay')])
->map(fn($event) ->map(fn($event)
=> [ => [

View File

@@ -134,13 +134,6 @@ $loadEvents = function () {
$request = new Request($relaySet, $requestMessage); $request = new Request($relaySet, $requestMessage);
$response = $request->send(); $response = $request->send();
// Check for errors in the response
if (isset($response[config('services.relay')][0][0]) && $response[config(
'services.relay'
)][0][0] === 'ERROR') {
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
}
$this->events = collect($response[config('services.relay')]) $this->events = collect($response[config('services.relay')])
->map(fn($event) ->map(fn($event)
=> [ => [