util.license: make bp-modification a method

This commit is contained in:
Jimmy Zelinskie 2016-10-17 15:20:09 -04:00 committed by Joseph Schorr
parent 6eb26d7998
commit a42eb09a3e
4 changed files with 28 additions and 23 deletions

View file

@ -18,7 +18,6 @@ from data import model
from endpoints.decorators import anon_protect, anon_allowed
from endpoints.v2.errors import V2RegistryException, Unauthorized
from util.http import abort
from util.license import enforce_license_before_request
from util.metrics.metricqueue import time_blueprint
from util.registry.dockerver import docker_version
from util.pagination import encrypt_page_token, decrypt_page_token
@ -28,7 +27,7 @@ logger = logging.getLogger(__name__)
v2_bp = Blueprint('v2', __name__)
enforce_license_before_request(license_validator, v2_bp)
license_validator.enforce_license_before_request(v2_bp)
time_blueprint(v2_bp, metric_queue)