Browse Source

updated methods to reflect POST = create and PUT = update. fixes #6

master
Julio Biason 11 years ago
parent
commit
2fa9310b49
  1. 2
      luncho/blueprints/groups.py
  2. 4
      luncho/blueprints/users.py

2
luncho/blueprints/groups.py

@ -223,7 +223,7 @@ def delete_group(group_id):
group_users = Blueprint('group_users', __name__)
@group_users.route('<int:group_id>/users/', methods=['PUT'])
@group_users.route('<int:group_id>/users/', methods=['POST'])
@ForceJSON(required=['usernames'])
@auth
def add_users_to_group(group_id):

4
luncho/blueprints/users.py

@ -40,7 +40,7 @@ class UsernameAlreadyExistsException(LunchoException):
self.message = 'Username already exists'
@users.route('', methods=['PUT'])
@users.route('', methods=['POST'])
@ForceJSON(required=['username', 'full_name', 'password'])
def create_user():
"""Create a new user.
@ -82,7 +82,7 @@ def create_user():
return jsonify(status='OK')
@users.route('', methods=['POST'])
@users.route('', methods=['PUT'])
@ForceJSON()
@auth
def update_user():

Loading…
Cancel
Save