<?php

declare(strict_types=1);

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Services\XPService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

final class UserXpController extends Controller
{
    public function __invoke(Request $request, XPService $xp): JsonResponse
    {
        return response()->json($xp->summary($request->user()->id));
    }
}
