@@ -28,7 +28,7 @@ def get_orm_session():
2828 status_code = status .HTTP_201_CREATED ,
2929 summary = "Creates a new Player" ,
3030)
31- def create_player (
31+ def post (
3232 player_model : PlayerModel = Body (...),
3333 orm_session : Session = Depends (get_orm_session ),
3434):
@@ -48,7 +48,7 @@ def create_player(
4848 status_code = status .HTTP_200_OK ,
4949 summary = "Retrieves a collection of Players"
5050)
51- def get_players (
51+ def get_all (
5252 orm_session : Session = Depends (get_orm_session )
5353):
5454 players = player_service .retrieve_all (orm_session )
@@ -62,7 +62,7 @@ def get_players(
6262 status_code = status .HTTP_200_OK ,
6363 summary = "Retrieves a Player by its Id"
6464)
65- def get_player_by_id (
65+ def get_by_id (
6666 player_id : int = Path (..., title = "The Id of the Player" ),
6767 orm_session : Session = Depends (get_orm_session )
6868):
@@ -80,7 +80,7 @@ def get_player_by_id(
8080 status_code = status .HTTP_200_OK ,
8181 summary = "Retrieves a Player by its Squad Number"
8282)
83- def get_player_by_squad_number (
83+ def get_by_squad_number (
8484 squad_number : int = Path (..., title = "The Squad Number of the Player" ),
8585 orm_session : Session = Depends (get_orm_session )
8686):
@@ -99,7 +99,7 @@ def get_player_by_squad_number(
9999 status_code = status .HTTP_204_NO_CONTENT ,
100100 summary = "Updates an existing Player"
101101)
102- def update_player (
102+ def put (
103103 player_id : int = Path (..., title = "The Id of the Player" ),
104104 player_model : PlayerModel = Body (...),
105105 orm_session : Session = Depends (get_orm_session ),
@@ -120,7 +120,7 @@ def update_player(
120120 status_code = status .HTTP_204_NO_CONTENT ,
121121 summary = "Deletes an existing Player"
122122)
123- def delete_player (
123+ def delete (
124124 player_id : int = Path (..., title = "The Id of the Player" ),
125125 orm_session : Session = Depends (get_orm_session )
126126):
0 commit comments