revisions complete
This commit is contained in:
@@ -341,20 +341,19 @@ class RecordController extends Controller
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
//
|
||||
// public function rollback(Request $request)
|
||||
// {
|
||||
// try {
|
||||
// $this->recordService->rollback(
|
||||
// userId: AuthService::currentUserId($request),
|
||||
// recordId: $request->route("rid"),
|
||||
// version: (int)$request->route("version")
|
||||
// );
|
||||
// } catch (ValidatorException $th) {
|
||||
// return fail($th->getFirstValidatorError());
|
||||
// } catch (LucentException|Throwable $th) {
|
||||
// return fail($th);
|
||||
// }
|
||||
// return ok();
|
||||
// }
|
||||
|
||||
public function rollback(Request $request)
|
||||
{
|
||||
try {
|
||||
$this->recordService->rollback(
|
||||
recordId: $request->route("rid"),
|
||||
version: (int)$request->route("version")
|
||||
);
|
||||
} catch (ValidatorException $th) {
|
||||
return fail($th->getFirstValidatorError());
|
||||
} catch (LucentException|Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user