diff --git a/API.md b/API.md index 332a34c..fe9e4b0 100644 --- a/API.md +++ b/API.md @@ -164,7 +164,7 @@ Input: "password": , "email": , "rank": , - "avatar_style": + "avatarStyle": } ``` Files: `avatar` - the content of the new avatar. diff --git a/server/szurubooru/api/user_api.py b/server/szurubooru/api/user_api.py index 2558eed..08f5eb6 100644 --- a/server/szurubooru/api/user_api.py +++ b/server/szurubooru/api/user_api.py @@ -101,11 +101,11 @@ class UserDetailApi(BaseApi): auth.verify_privilege(context.user, 'users:edit:%s:rank' % infix) users.update_rank(user, context.request['rank'], context.user) - if 'avatar_style' in context.request: + if 'avatarStyle' in context.request: auth.verify_privilege(context.user, 'users:edit:%s:avatar' % infix) users.update_avatar( user, - context.request['avatar_style'], + context.request['avatarStyle'], context.files.get('avatar') or None) context.session.commit()