mirror of
https://github.com/anonaddy/anonaddy
synced 2026-05-10 17:12:04 +02:00
28 lines
546 B
PHP
28 lines
546 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
|
|
class WebauthnEnabledKeyController extends Controller
|
|
{
|
|
public function store(Request $request)
|
|
{
|
|
$webauthnKey = user()->webauthnKeys()->findOrFail($request->id);
|
|
|
|
$webauthnKey->enable();
|
|
|
|
return response('', 201);
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
$webauthnKey = user()->webauthnKeys()->findOrFail($id);
|
|
|
|
$webauthnKey->disable();
|
|
|
|
return response('', 204);
|
|
}
|
|
}
|