Rename gravatar field after the bees merge.
This commit is contained in:
parent
1c32faa31d
commit
b3240de1f8
1 changed files with 8 additions and 8 deletions
|
@ -152,7 +152,7 @@ class User(ApiResource):
|
|||
'id': 'UserView',
|
||||
'type': 'object',
|
||||
'description': 'Describes a user',
|
||||
'required': ['verified', 'anonymous', 'gravatar'],
|
||||
'required': ['verified', 'anonymous', 'avatar'],
|
||||
'properties': {
|
||||
'verified': {
|
||||
'type': 'boolean',
|
||||
|
@ -166,9 +166,9 @@ class User(ApiResource):
|
|||
'type': 'string',
|
||||
'description': 'The user\'s email address',
|
||||
},
|
||||
'gravatar': {
|
||||
'avatar': {
|
||||
'type': 'string',
|
||||
'description': 'Gravatar hash representing the user\'s icon'
|
||||
'description': 'Avatar hash representing the user\'s icon'
|
||||
},
|
||||
'organizations': {
|
||||
'type': 'array',
|
||||
|
@ -212,7 +212,7 @@ class User(ApiResource):
|
|||
user = get_authenticated_user()
|
||||
user_data = request.get_json()
|
||||
|
||||
try:
|
||||
try:
|
||||
if 'password' in user_data:
|
||||
logger.debug('Changing password for user: %s', user.username)
|
||||
log_action('account_change_password', user.username)
|
||||
|
@ -230,8 +230,8 @@ class User(ApiResource):
|
|||
if model.find_user_by_email(new_email):
|
||||
# Email already used.
|
||||
raise request_error(message='E-mail address already used')
|
||||
|
||||
if features.MAILING:
|
||||
|
||||
if features.MAILING:
|
||||
logger.debug('Sending email to change email address for user: %s',
|
||||
user.username)
|
||||
code = model.create_confirm_email_code(user, new_email=new_email)
|
||||
|
@ -247,7 +247,7 @@ class User(ApiResource):
|
|||
raise request_error(message='Username is already in use')
|
||||
|
||||
model.change_username(user, new_username)
|
||||
|
||||
|
||||
except model.InvalidPasswordException, ex:
|
||||
raise request_error(exception=ex)
|
||||
|
||||
|
@ -316,7 +316,7 @@ class PrivateRepositories(ApiResource):
|
|||
plan = get_plan(cus.subscription.plan.id)
|
||||
if plan:
|
||||
repos_allowed = plan['privateRepos']
|
||||
|
||||
|
||||
return {
|
||||
'privateCount': private_repos,
|
||||
'privateAllowed': (private_repos < repos_allowed)
|
||||
|
|
Reference in a new issue