voting system with nostr added

This commit is contained in:
fsociety
2024-09-29 01:02:04 +02:00
parent a0ef037b2d
commit 354680f702
43 changed files with 3017 additions and 20688 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers\Api\Nostr;
use App\Http\Controllers\Controller;
use App\Models\Profile;
use App\Traits\NostrFetcherTrait;
use Illuminate\Http\Request;
class GetProfile extends Controller
{
use NostrFetcherTrait;
public function __invoke($key, Request $request)
{
if (!Profile::query()->where('pubkey', $key)->exists()) {
$this->fetchProfile([$key]);
}
return Profile::query()
->where('pubkey', $key)
->first();
}
}