<?php

namespace Lucent\Http\Controller;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Lucent\Record\RecordRepo;
use Lucent\Revision\RevisionRepo;
use Lucent\Revision\RevisionService;
use function Lucent\Response\fail;
use function Lucent\Response\ok;

class RevisionController extends Controller
{
    public function __construct(
        public RevisionService $revisionService
    ){}

    public function index(Request $request)
    {
        $revisions = $this->revisionService->getByRecordId($request->route("rid"));
        return ok($revisions->toArray());
    }

}
