mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-09 11:20:15 +00:00
🛠️ Simplify route definition and update JS for Nostr profile handling
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user