implement Character page (broken Vuex reactivity, temporary data field fix), rename CharacterList to CharacterBadges, begin work on list of Characters (Characters.vue)

This commit is contained in:
Xevion
2020-09-17 13:57:37 -05:00
parent b31635864f
commit 2894a654af
6 changed files with 73 additions and 21 deletions

View File

@@ -110,6 +110,8 @@ def api_character_all(character: str):
@current_app.route('/api/character/<character>/quotes/')
def api_character_quotes(character: str):
quotes = character_data[character]['quotes']
# Compute pagination if argument is available. Static 10 results per page, one-indexed.
if 'page' in request.args.keys():
index: int = (int(request.args['page']) - 1) * 10
return jsonify(quotes[index: index + 10])

View File

@@ -64907,4 +64907,4 @@
}
]
}
]
]