From c320d10e0871db70f1d4c80f9554853574398656 Mon Sep 17 00:00:00 2001 From: b1ek Date: Fri, 30 Aug 2024 17:35:18 +1000 Subject: [PATCH] refactor: remove /api/users/private/trash/list --- app/Http/Controllers/TrashUserController.php | 5 ----- app/Services/UserTrashService.php | 5 ----- public/openapi.yml | 20 -------------------- routes/web.php | 1 - 4 files changed, 31 deletions(-) diff --git a/app/Http/Controllers/TrashUserController.php b/app/Http/Controllers/TrashUserController.php index 66678ce..a336f60 100644 --- a/app/Http/Controllers/TrashUserController.php +++ b/app/Http/Controllers/TrashUserController.php @@ -40,9 +40,4 @@ class TrashUserController extends Controller return response()->json($ret, 404); } } - - public function list(AuthorizedRequest $request) - { - return $this->userTrashService->listUsersInTrash(); - } } diff --git a/app/Services/UserTrashService.php b/app/Services/UserTrashService.php index eaff421..e292723 100644 --- a/app/Services/UserTrashService.php +++ b/app/Services/UserTrashService.php @@ -40,9 +40,4 @@ class UserTrashService return User::whereIn('id', $ids)->whereNotNull('deleted_at')->delete(); } - - public function listUsersInTrash(): array - { - return User::whereNotNull('deleted_at')->get()->toArray(); - } } diff --git a/public/openapi.yml b/public/openapi.yml index 06eea05..a7c529b 100644 --- a/public/openapi.yml +++ b/public/openapi.yml @@ -440,26 +440,6 @@ paths: description: Auth failed 403: description: Auth failed - /api/users/private/trash/list: - get: - summary: List users in trash - tags: - - Private routes - security: - - session: [] - responses: - 200: - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - 401: - description: Auth failed - 403: - description: Auth failed components: schemas: User: diff --git a/routes/web.php b/routes/web.php index 76109a4..5e07be3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -25,7 +25,6 @@ Route::prefix('/api')->group(function() { Route::put('/group', 'addMultiple'); Route::delete('/group', 'deleteMultiple'); Route::delete('/clean', 'cleanMultiple'); - Route::get('/list', 'list'); }); });