Fix some errors.

This commit is contained in:
jakedt 2014-03-17 14:52:52 -04:00
parent 1ae04658ef
commit 5cc2bdbc71
2 changed files with 10 additions and 12 deletions

View file

@ -35,10 +35,8 @@ class UserRobot(ApiResource):
""" Create a new user robot with the specified name. """ """ Create a new user robot with the specified name. """
parent = get_authenticated_user() parent = get_authenticated_user()
robot, password = model.create_robot(robot_shortname, parent) robot, password = model.create_robot(robot_shortname, parent)
resp = robot_view(robot.username, password)
log_action('create_robot', parent.username, {'robot': robot_shortname}) log_action('create_robot', parent.username, {'robot': robot_shortname})
resp.status_code = 201 return robot_view(robot.username, password), 201
return resp
@nickname('deleteUserRobot') @nickname('deleteUserRobot')
def delete(self, robot_shortname): def delete(self, robot_shortname):

View file

@ -226,22 +226,22 @@ class ConvertToOrganization(ApiResource):
'type': 'object', 'type': 'object',
'description': 'Information required to convert a user to an organization.', 'description': 'Information required to convert a user to an organization.',
'required': [ 'required': [
'username', 'adminUser',
'password', 'adminPassword',
'email', 'plan',
], ],
'properties': { 'properties': {
'username': { 'adminUser': {
'type': 'string', 'type': 'string',
'description': 'The user\'s username', 'description': 'The user who will become an org admin\'s username',
}, },
'password': { 'adminPassword': {
'type': 'string', 'type': 'string',
'description': 'The user\'s password', 'description': 'The user who will become an org admin\'s password',
}, },
'email': { 'plan': {
'type': 'string', 'type': 'string',
'description': 'The user\'s email address', 'description': 'The plan to which the organizatino should be subscribed',
}, },
}, },
}, },