add torrent pieces hash

This commit is contained in:
xiaomlove
2023-07-26 03:29:50 +08:00
parent 68b391785b
commit 47346c4844
8 changed files with 193 additions and 3 deletions

View File

@@ -148,4 +148,13 @@ class TorrentController extends Controller
return $this->success($params);
}
public function queryByPiecesHash(Request $request)
{
$request->validate([
'pieces_hash' => 'required|array',
]);
$result = $this->repository->getPiecesHashCache($request->pieces_hash);
return $this->success($result);
}
}