maeser.controllers.user_management_api module#
User management API controller.
This module provides an API endpoint for managing users, including listing users, toggling admin and banned statuses, updating request counts, removing users from the cache, fetching users, listing cleanable users, and cleaning the cache.
© 2024 Carson Bush
This file is part of Maeser.
Maeser is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Maeser is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Maeser. If not, see <https://www.gnu.org/licenses/>.
- maeser.controllers.user_management_api.controller(user_manager: UserManager) list[dict[str, Any]] | dict[str, str] | list[Any] [source]#
API endpoint for user management.
- Parameters:
user_manager (UserManager) – User Manager object to interact with the user database.
- Returns:
JSON response with the result of the command.
- Return type:
list[dict[str, Any]] | dict[str, str] | list[Any]
- Aborts:
400: If the request is not JSON or a required parameter is missing.