fixed errant method name refactor, added docstrings
This commit is contained in:
@@ -63,7 +63,7 @@ class EventController(BaseController):
|
||||
"""
|
||||
Builds and returns a single EventSeries object by its numeric ID.
|
||||
"""
|
||||
if not (data := await self.db.select_one_series_by_id(series_id)):
|
||||
if not (data := await self.db.select_one_by_id(series_id)):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Event not found"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ class GroupController(BaseController):
|
||||
self.db: GroupQueries = group_queries
|
||||
|
||||
async def get_group(self) -> Group:
|
||||
if (data := await self.db.select_one_series_by_id()) is None:
|
||||
if (data := await self.db.select_one_by_id()) is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Group not found"
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ class MusicianController(BaseController):
|
||||
)
|
||||
|
||||
async def get_musician(self, id: int) -> Musician:
|
||||
if (data := await self.db.select_one_series_by_id(id)) is None:
|
||||
if (data := await self.db.select_one_by_id(id)) is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Musician not found"
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ class UserController(BaseController):
|
||||
)
|
||||
|
||||
async def get_user_by_id(self, id: int) -> User:
|
||||
if (data := await self.db.select_one_series_by_id(id)) is None:
|
||||
if (data := await self.db.select_one_by_id(id)) is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="User not found"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user