Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from flask import Blueprint, current_app |
||
2 | from flask_api import exceptions |
||
3 | |||
4 | from ..extensions import cache |
||
5 | |||
6 | |||
7 | blueprint = Blueprint('fonts', __name__, url_prefix="/api/fonts/") |
||
8 | |||
9 | |||
10 | @blueprint.route("") |
||
11 | @cache.cached() |
||
12 | def get(): |
||
13 | """Get a list of all available fonts.""" |
||
14 | return sorted(current_app.font_service.all()) |
||
15 | |||
16 | |||
17 | @blueprint.route("", methods=['POST']) |
||
18 | def create_font(): |
||
19 | raise exceptions.PermissionDenied(current_app.config['CONTRIBUTING_URL']) |
||
20 |