diff --git a/luncho/blueprints/groups.py b/luncho/blueprints/groups.py index e4aa6a0..2b2a065 100644 --- a/luncho/blueprints/groups.py +++ b/luncho/blueprints/groups.py @@ -255,8 +255,10 @@ def delete_group(groupId): return jsonify(status='OK') +group_users = Blueprint('group_users', __name__) -@groups.route('/users/', methods=['PUT']) + +@group_users.route('/users/', methods=['PUT']) @ForceJSON(required=['usernames']) @auth def add_users_to_group(groupId): @@ -312,7 +314,7 @@ def add_users_to_group(groupId): return jsonify(status='OK') -@groups.route('/users/', methods=['GET']) +@group_users.route('/users/', methods=['GET']) @auth def list_group_members(groupId): """*Authenticated request* diff --git a/luncho/server.py b/luncho/server.py index 36c0ab6..7d8269a 100644 --- a/luncho/server.py +++ b/luncho/server.py @@ -127,11 +127,13 @@ class Place(db.Model): from blueprints.users import users from blueprints.token import token from blueprints.groups import groups +from blueprints.groups import group_users from blueprints.places import places app.register_blueprint(token, url_prefix='/token/') app.register_blueprint(users, url_prefix='/user/') app.register_blueprint(groups, url_prefix='/group/') +app.register_blueprint(group_users, url_prefix='/group/') app.register_blueprint(places, url_prefix='/place/')