refactor: remove /api/users/private/trash/list
This commit is contained in:
parent
0595a73b67
commit
c320d10e08
|
@ -40,9 +40,4 @@ class TrashUserController extends Controller
|
||||||
return response()->json($ret, 404);
|
return response()->json($ret, 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list(AuthorizedRequest $request)
|
|
||||||
{
|
|
||||||
return $this->userTrashService->listUsersInTrash();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,4 @@ class UserTrashService
|
||||||
|
|
||||||
return User::whereIn('id', $ids)->whereNotNull('deleted_at')->delete();
|
return User::whereIn('id', $ids)->whereNotNull('deleted_at')->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function listUsersInTrash(): array
|
|
||||||
{
|
|
||||||
return User::whereNotNull('deleted_at')->get()->toArray();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -440,26 +440,6 @@ paths:
|
||||||
description: Auth failed
|
description: Auth failed
|
||||||
403:
|
403:
|
||||||
description: Auth failed
|
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:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
User:
|
User:
|
||||||
|
|
|
@ -25,7 +25,6 @@ Route::prefix('/api')->group(function() {
|
||||||
Route::put('/group', 'addMultiple');
|
Route::put('/group', 'addMultiple');
|
||||||
Route::delete('/group', 'deleteMultiple');
|
Route::delete('/group', 'deleteMultiple');
|
||||||
Route::delete('/clean', 'cleanMultiple');
|
Route::delete('/clean', 'cleanMultiple');
|
||||||
Route::get('/list', 'list');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue