From 964208534e36670f45407ac2c9930b24bb6c2a8e Mon Sep 17 00:00:00 2001 From: ildyria Date: Mon, 16 Dec 2024 14:19:53 +0100 Subject: [PATCH] remove dead code --- routes/api_v2.php | 1 - tests/Feature_v2/Maintenance/TreeTest.php | 9 --------- 2 files changed, 10 deletions(-) diff --git a/routes/api_v2.php b/routes/api_v2.php index b80336d734e..24daa636145 100644 --- a/routes/api_v2.php +++ b/routes/api_v2.php @@ -201,7 +201,6 @@ Route::get('/Maintenance::jobs', [Admin\Maintenance\FixJobs::class, 'check']); Route::post('/Maintenance::jobs', [Admin\Maintenance\FixJobs::class, 'do']); Route::get('/Maintenance::tree', [Admin\Maintenance\FixTree::class, 'check']); -Route::post('/Maintenance::tree', [Admin\Maintenance\FixTree::class, 'do']); Route::get('/Maintenance::genSizeVariants', [Admin\Maintenance\GenSizeVariants::class, 'check']); Route::post('/Maintenance::genSizeVariants', [Admin\Maintenance\GenSizeVariants::class, 'do']); Route::get('/Maintenance::missingFileSize', [Admin\Maintenance\MissingFileSizes::class, 'check']); diff --git a/tests/Feature_v2/Maintenance/TreeTest.php b/tests/Feature_v2/Maintenance/TreeTest.php index a14b7834194..7441305fca0 100644 --- a/tests/Feature_v2/Maintenance/TreeTest.php +++ b/tests/Feature_v2/Maintenance/TreeTest.php @@ -20,26 +20,17 @@ public function testGuest(): void { $response = $this->getJsonWithData('Maintenance::tree', []); $this->assertUnauthorized($response); - - $response = $this->postJson('Maintenance::tree'); - $this->assertUnauthorized($response); } public function testUser(): void { $response = $this->actingAs($this->userLocked)->getJsonWithData('Maintenance::tree'); $this->assertForbidden($response); - - $response = $this->actingAs($this->userLocked)->postJson('Maintenance::tree'); - $this->assertForbidden($response); } public function testAdmin(): void { $response = $this->actingAs($this->admin)->getJsonWithData('Maintenance::tree'); $this->assertOk($response); - - $response = $this->actingAs($this->admin)->postJson('Maintenance::tree'); - $this->assertOk($response); } } \ No newline at end of file