From 5cc2bdbc715401f9348a94bfeb9e201bfae8f0df Mon Sep 17 00:00:00 2001 From: jakedt Date: Mon, 17 Mar 2014 14:52:52 -0400 Subject: [PATCH] Fix some errors. --- endpoints/api/robot.py | 4 +--- endpoints/api/user.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/endpoints/api/robot.py b/endpoints/api/robot.py index 6bcc34027..67737a9f2 100644 --- a/endpoints/api/robot.py +++ b/endpoints/api/robot.py @@ -35,10 +35,8 @@ class UserRobot(ApiResource): """ Create a new user robot with the specified name. """ parent = get_authenticated_user() robot, password = model.create_robot(robot_shortname, parent) - resp = robot_view(robot.username, password) log_action('create_robot', parent.username, {'robot': robot_shortname}) - resp.status_code = 201 - return resp + return robot_view(robot.username, password), 201 @nickname('deleteUserRobot') def delete(self, robot_shortname): diff --git a/endpoints/api/user.py b/endpoints/api/user.py index 1d5ccf13e..b1d9a5800 100644 --- a/endpoints/api/user.py +++ b/endpoints/api/user.py @@ -226,22 +226,22 @@ class ConvertToOrganization(ApiResource): 'type': 'object', 'description': 'Information required to convert a user to an organization.', 'required': [ - 'username', - 'password', - 'email', + 'adminUser', + 'adminPassword', + 'plan', ], 'properties': { - 'username': { + 'adminUser': { 'type': 'string', - 'description': 'The user\'s username', + 'description': 'The user who will become an org admin\'s username', }, - 'password': { + 'adminPassword': { 'type': 'string', - 'description': 'The user\'s password', + 'description': 'The user who will become an org admin\'s password', }, - 'email': { + 'plan': { 'type': 'string', - 'description': 'The user\'s email address', + 'description': 'The plan to which the organizatino should be subscribed', }, }, },