diff --git a/app/master_sound/api/resources/album_resource.py b/app/master_sound/api/resources/album_resource.py index f055dfb..96dc377 100644 --- a/app/master_sound/api/resources/album_resource.py +++ b/app/master_sound/api/resources/album_resource.py @@ -20,6 +20,9 @@ def get(self): result['artists'] = [result['artists'][0]] return results, 200 + # TODO: + # This method is large and hard to read + # Is possible use global try/catch def post(self): data = request.get_json() for _json in data: diff --git a/app/master_sound/api/resources/song_resource.py b/app/master_sound/api/resources/song_resource.py index 5ff761e..0fb01ec 100644 --- a/app/master_sound/api/resources/song_resource.py +++ b/app/master_sound/api/resources/song_resource.py @@ -25,6 +25,8 @@ def get(self, album_id): return results, 200 def post(self): + # TODO: + # Data is unused data = request.get_json() diff --git a/app/master_sound/models.py b/app/master_sound/models.py index 39e95f8..0a63727 100644 --- a/app/master_sound/models.py +++ b/app/master_sound/models.py @@ -4,6 +4,11 @@ from app.db import db, BaseModelMixin + +# TODO: +# It's doesn't recommend handle migrations in the same file that the models +# And the migrations should be handle with scripts + albums_artists = db.Table( 'albums_artists', db.Model.metadata, diff --git a/app/spotify_api.py b/app/spotify_api.py index f0d4c7d..2524fa6 100644 --- a/app/spotify_api.py +++ b/app/spotify_api.py @@ -7,6 +7,8 @@ def get_token(): BASE_TOKEN_URL = 'https://accounts.spotify.com/api/token' + # TODO: + # Put tokens in code it's bad practice CLIENT_ID = 'aba92b636b61480c992f35aa022405f7' CLIENT_SECRET = '1d4db40d8e304d43bce78d5bea3d9751' client_str = f'{CLIENT_ID}:{CLIENT_SECRET}'