mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 17:10:41 +00:00
Implement flask-breadcrumbs everywhere
This commit is contained in:
@ -1,5 +1,2 @@
|
||||
from flask import Blueprint
|
||||
|
||||
|
||||
bp = Blueprint('followers', __name__)
|
||||
from .. import bp
|
||||
from . import json_routes
|
||||
|
@ -12,15 +12,7 @@ from ..decorators import corpus_owner_or_admin_required
|
||||
from . import bp
|
||||
|
||||
|
||||
##############################################################################
|
||||
# IMPORTANT NOTE: These routes are prefixed by the blueprint #
|
||||
# Prefix: <hashid:corpus_id>/followers #
|
||||
# This implies that the corpus_id is always in the kwargs of #
|
||||
# a route that is registered to this blueprint. #
|
||||
##############################################################################
|
||||
|
||||
|
||||
@bp.route('', methods=['POST'])
|
||||
@bp.route('/<hashid:corpus_id>/followers', methods=['POST'])
|
||||
@login_required
|
||||
@corpus_owner_or_admin_required
|
||||
@content_negotiation(consumes='application/json', produces='application/json')
|
||||
@ -42,7 +34,7 @@ def create_corpus_followers(corpus_id):
|
||||
return response
|
||||
|
||||
|
||||
@bp.route('/<hashid:follower_id>/role', methods=['PUT'])
|
||||
@bp.route('/<hashid:corpus_id>/followers/<hashid:follower_id>/role', methods=['PUT'])
|
||||
@login_required
|
||||
@corpus_owner_or_admin_required
|
||||
@content_negotiation(consumes='application/json', produces='application/json')
|
||||
@ -65,7 +57,7 @@ def update_corpus_follower_role(corpus_id, follower_id):
|
||||
return response
|
||||
|
||||
|
||||
@bp.route('/<hashid:follower_id>', methods=['DELETE'])
|
||||
@bp.route('/<hashid:corpus_id>/followers/<hashid:follower_id>', methods=['DELETE'])
|
||||
@login_required
|
||||
@content_negotiation(produces='application/json')
|
||||
def delete_corpus_follower(corpus_id, follower_id):
|
||||
|
Reference in New Issue
Block a user