mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-11 14:50:30 +00:00
351dd87fa9
- 🌐 Added API documentation annotations for multiple controllers (Meetups, Cities, Countries, Courses, Highscores, Venues), improving public and developer-facing endpoint clarity. - ➕ Integrated and configured the `dedoc/scramble` package for automated OpenAPI documentation generation. - 🔒 Excluded internal routes and actions from API documentation using `ExcludeRouteFromDocs` attributes. - 🌍 Added new localization keys for API Token features across multiple languages (`lv`, `es`, etc.). - 🛠️ Introduced `Group`, `Response`, and `QueryParameter` attributes for better request descriptions and structured documentation. - 🚀 Enhanced functionality for listing operations in controllers with filters and query parameters like `search` and `selected`.
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\User;
|
|
use Dedoc\Scramble\Attributes\Group;
|
|
use Illuminate\Support\Collection;
|
|
|
|
#[Group(name: 'Community', weight: 7)]
|
|
class NostrPlebController extends Controller
|
|
{
|
|
/**
|
|
* Nostr-Pubkeys (npubs) der Community
|
|
*
|
|
* Liefert die eindeutigen npub-Public-Keys aller Nutzer mit hinterlegtem Nostr-Profil.
|
|
*
|
|
* @return Collection<int, string>
|
|
*/
|
|
public function __invoke(): Collection
|
|
{
|
|
return User::query()
|
|
->select([
|
|
'email',
|
|
'public_key',
|
|
'lightning_address',
|
|
'lnurl',
|
|
'node_id',
|
|
'paynym',
|
|
'lnbits',
|
|
'nostr',
|
|
'id',
|
|
])
|
|
->whereNotNull('nostr')
|
|
->where('nostr', 'like', 'npub1%')
|
|
->orderByDesc('id')
|
|
->get()
|
|
->unique('nostr')
|
|
->pluck('nostr');
|
|
}
|
|
}
|