@@ -61,6 +61,7 @@ def create_accounts():
6161# LIST ALL ACCOUNTS
6262######################################################################
6363
64+
6465@app .route ("/accounts" , methods = ["GET" ])
6566def list_accounts ():
6667 """
@@ -79,6 +80,7 @@ def list_accounts():
7980# READ AN ACCOUNT
8081######################################################################
8182
83+
8284@app .route ("/accounts/<int:account_id>" , methods = ["GET" ])
8385def get_accounts (account_id ):
8486 """
@@ -96,6 +98,7 @@ def get_accounts(account_id):
9698# UPDATE AN EXISTING ACCOUNT
9799######################################################################
98100
101+
99102@app .route ("/accounts/<int:account_id>" , methods = ["PUT" ])
100103def update_accounts (account_id ):
101104 """
@@ -117,6 +120,7 @@ def update_accounts(account_id):
117120# DELETE AN ACCOUNT
118121######################################################################
119122
123+
120124@app .route ("/accounts/<int:account_id>" , methods = ["DELETE" ])
121125def delete_accounts (account_id ):
122126 """
@@ -135,6 +139,7 @@ def delete_accounts(account_id):
135139# U T I L I T Y F U N C T I O N S
136140######################################################################
137141
142+
138143def check_content_type (media_type ):
139144 """Checks that the media type is correct"""
140145 content_type = request .headers .get ("Content-Type" )
0 commit comments