|
@ -7,6 +7,7 @@ from flask import ( |
|
|
Blueprint |
|
|
Blueprint |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
from acks.views import basic_auth |
|
|
from .quest_manager import ( |
|
|
from .quest_manager import ( |
|
|
load_quests, |
|
|
load_quests, |
|
|
get_quest_details, |
|
|
get_quest_details, |
|
@ -22,16 +23,19 @@ quest_views = Blueprint( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
@quest_views.route('/list') |
|
|
@quest_views.route('/list') |
|
|
|
|
|
@basic_auth.required |
|
|
def quest_list(): |
|
|
def quest_list(): |
|
|
quests = load_quests() |
|
|
quests = load_quests() |
|
|
return render_template('quest_list.html', quest_map=quests) |
|
|
return render_template('quest_list.html', quest_map=quests) |
|
|
|
|
|
|
|
|
@quest_views.route('/detail/<int:level>/<string:quest_name>') |
|
|
@quest_views.route('/detail/<int:level>/<string:quest_name>') |
|
|
|
|
|
@basic_auth.required |
|
|
def quest_detail(level, quest_name): |
|
|
def quest_detail(level, quest_name): |
|
|
quest = get_quest_details(level, quest_name) |
|
|
quest = get_quest_details(level, quest_name) |
|
|
return render_template('quest_detail.html', quest=quest) |
|
|
return render_template('quest_detail.html', quest=quest) |
|
|
|
|
|
|
|
|
@quest_views.route('/detail/<int:level>/<string:quest_name>/download') |
|
|
@quest_views.route('/detail/<int:level>/<string:quest_name>/download') |
|
|
|
|
|
@basic_auth.required |
|
|
def quest_download(level, quest_name): |
|
|
def quest_download(level, quest_name): |
|
|
archive = get_quest_archive(level, quest_name) |
|
|
archive = get_quest_archive(level, quest_name) |
|
|
return send_file(archive, attachment_filename="acks_{0}.zip".format(quest_name), as_attachment=True) |
|
|
return send_file(archive, attachment_filename="acks_{0}.zip".format(quest_name), as_attachment=True) |
|
|