Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/master_sound/api/resources/album_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions app/master_sound/api/resources/song_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def get(self, album_id):
return results, 200

def post(self):
# TODO:
# Data is unused
data = request.get_json()


5 changes: 5 additions & 0 deletions app/master_sound/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions app/spotify_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down