mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
fix remove claim
This commit is contained in:
@@ -77,7 +77,7 @@ class ClaimRepository extends BaseRepository
|
||||
public function delete($id, $uid)
|
||||
{
|
||||
$isEnabled = Claim::getConfigIsEnabled();
|
||||
if ($isEnabled) {
|
||||
if (!$isEnabled) {
|
||||
throw new \RuntimeException(nexus_trans("torrent.claim_disabled"));
|
||||
}
|
||||
$model = Claim::query()->findOrFail($id);
|
||||
|
||||
@@ -13,6 +13,9 @@ return new class extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('complains')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('complains', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->char('uuid', 36);
|
||||
|
||||
@@ -13,6 +13,9 @@ return new class extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('complain_replies')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('complain_replies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('complain');
|
||||
|
||||
Reference in New Issue
Block a user