mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-07-02 09:00:23 +00:00
✨ Refactor components and models:
- 🔥 Removed deprecated `placeholder-pattern` component. - 🧹 Simplified and cleaned up Blade views by removing unused comments and sections. - 🗂️ Extracted `SetsCreatedBy` concern for DRY and reused it across models. - 🔧 Consolidated configuration for Horizon `authorized_nostr_keys`. - 🧪 Migrated media conversion to use new Spatie enums for clarity. - ♻️ Replaced repetitive link rendering with dynamic rendering in meetups and services views.
This commit is contained in:
@@ -60,7 +60,11 @@ final class LnurlAuthController extends Controller
|
||||
}
|
||||
|
||||
$user = $this->findOrCreateUser($validated['k1'], $validated['key']);
|
||||
$this->ensureLoginKeyExists($validated['k1'], $user->id);
|
||||
|
||||
LoginKey::query()->updateOrCreate(
|
||||
['k1' => $validated['k1']],
|
||||
['user_id' => $user->id],
|
||||
);
|
||||
|
||||
Log::info('LNURL auth successful', [
|
||||
'user_id' => $user->id,
|
||||
@@ -150,20 +154,6 @@ final class LnurlAuthController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure a login key record exists for the given challenge.
|
||||
*
|
||||
* @param string $k1 The challenge identifier
|
||||
* @param int $userId The user ID
|
||||
*/
|
||||
private function ensureLoginKeyExists(string $k1, int $userId): void
|
||||
{
|
||||
LoginKey::query()->updateOrCreate(
|
||||
['k1' => $k1],
|
||||
['user_id' => $userId],
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an LNURL-compliant error response.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user