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