"""This blueprint contains common reusable pieces of functionality of the application.""" from flask import Blueprint from core import views as core_views from utils.exceptions import APIError blueprint = Blueprint("core", __name__) blueprint.add_url_rule("/currencies", view_func=core_views.CurrencyListView.as_view("currency_list")) blueprint.add_url_rule("/health", view_func=core_views.HealthCheckView.as_view("health_check")) blueprint.add_url_rule("/hello", view_func=core_views.BasicHealthCheckView.as_view("basic_health_check")) blueprint.add_url_rule("/user-labels", view_func=core_views.UserLabelListView.as_view("user_label_list")) blueprint.add_url_rule("/labels", view_func=core_views.LabelListView.as_view("label_list")) blueprint.add_url_rule("/territories", view_func=core_views.TerritoryListView.as_view("territory_list")) blueprint.add_url_rule("/country-codes", view_func=core_views.CountryCodes.as_view("country_codes")) blueprint.add_url_rule("/record-types", view_func=core_views.RecordTypesView.as_view("record_types")) blueprint.add_url_rule("/genres", view_func=core_views.GenresView.as_view("genres")) blueprint.add_url_rule("/release-types", view_func=core_views.ReleaseTypesView.as_view("release_types")) @blueprint.app_errorhandler(APIError) def handle_api_error(error): return error.respond()