Added url with capabilties
This commit is contained in:
parent
32f0dad639
commit
677eba19b5
@ -5,6 +5,7 @@
|
|||||||
use Illuminate\Http\Client\Request;
|
use Illuminate\Http\Client\Request;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Js;
|
||||||
|
|
||||||
class InfoController extends Controller
|
class InfoController extends Controller
|
||||||
{
|
{
|
||||||
@ -12,4 +13,9 @@ public function info(): JsonResponse
|
|||||||
{
|
{
|
||||||
return new JsonResponse(['User' => Auth::user()]);
|
return new JsonResponse(['User' => Auth::user()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function capabilities(): JsonResponse
|
||||||
|
{
|
||||||
|
return new JsonResponse(['login' => true, 'register' => true, 'reset' => true]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
'allowed_methods' => ['*'],
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
'allowed_origins' => [env('FRONTEND_URL', 'http://localhost:3000')],
|
'allowed_origins' => ['*'],
|
||||||
|
|
||||||
'allowed_origins_patterns' => [],
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
'allowed_headers' => ['*'],
|
'allowed_headers' => ['X-BlackbirdChessClient'],
|
||||||
|
|
||||||
'exposed_headers' => [],
|
'exposed_headers' => [],
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
| is assigned the "api" middleware group. Enjoy building your API!
|
| is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
Route::get('/capabilities', [App\Http\Controllers\InfoController::class, 'capabilities']);
|
||||||
|
|
||||||
Route::middleware(['auth:sanctum'])->get('/user', function (Request $request) {
|
Route::middleware(['auth:sanctum'])->get('/user', function (Request $request) {
|
||||||
return $request->user();
|
return $request->user();
|
||||||
|
Loading…
Reference in New Issue
Block a user