Muscle Group Controllers¶
Muscle Groups Management Endpoints.
Provides functionality for CRUD operations on muscle groups.
Creating, updating, and deleting muscle group entries requires superuser privileges. Reading muscle group data is available to all authenticated users.
- async create_muscle_group(_: app.domain.users.schemas.UserAuth, schema_data: MuscleGroupCreate) MsgSpecJSONResponse[source]¶
Create a new muscle group entry.
Requires superuser privileges.
- Returns:
The created muscle group data.
- Return type:
- Raises:
ConflictException – If a muscle group with the same name already exists.
- async get_list_muscle_groups(_: app.domain.users.schemas.UserAuth) MsgSpecJSONResponse[source]¶
Retrieve all muscle groups with filtering and sorting.
- Returns:
A list of muscle group items.
- Return type:
- async get_muscle_group(_: app.domain.users.schemas.UserAuth, muscle_id: int) MsgSpecJSONResponse[source]¶
Get information about a specific muscle group.
- Returns:
Detailed muscle group data.
- Return type:
- Raises:
NotFoundException – If the muscle group with the given ID does not exist.
- async update_muscle_group(_: app.domain.users.schemas.UserAuth, schema_data: MuscleGroupUpdate, muscle_id: int) MsgSpecJSONResponse[source]¶
Update information about a specific muscle group.
Requires superuser privileges.
- Returns:
The updated muscle group data.
- Return type:
- Raises:
NotFoundException – If the muscle group with the given ID does not exist.
ConflictException – If a muscle group with the same name already exists.
- async delete_muscle_group(_: app.domain.users.schemas.UserAuth, muscle_id: int) Response[source]¶
Remove a muscle group from the system.
Requires superuser privileges.
- Returns:
204 No Content on success.
- Return type:
Response
- Raises:
NotFoundException – If the muscle group with the given ID does not exist.