From c788061976c94f98336621e05a26e71aa5488efd Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 10 Apr 2016 16:00:57 +0200 Subject: [PATCH] server/users: fix avatarStyle letter case in json --- API.md | 2 +- server/szurubooru/api/user_api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 332a34cc..fe9e4b04 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 2558eed7..08f5eb6a 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()