🛠️ Simplify route definition and update JS for Nostr profile handling

This commit is contained in:
HolgerHatGarKeineNode
2026-01-06 19:57:43 +01:00
parent 772853dc61
commit 5783445b68
7 changed files with 50 additions and 14 deletions

View File

@@ -24,8 +24,14 @@ class GetProfile extends Controller
'npub' => (new Key)->convertPublicKeyToBech32($key),
]);
return Profile::query()
$profile = Profile::query()
->where('pubkey', $key)
->first();
if (!$profile) {
return response()->json(['message' => 'Profile not found'], 200);
}
return $profile;
}
}

View File

@@ -40,11 +40,10 @@ trait NostrFetcherTrait
$requestMessage = new RequestMessage($subscriptionId, $filters);
$relayUrls = [
'wss://relay.nostr.band',
'wss://relay.primal.net',
'wss://purplepag.es',
'wss://nostr.wine',
'wss://relay.damus.io',
'wss://nostr.einundzwanzig.space',
];
$data = null;