server/users: fix avatarStyle letter case in json
This commit is contained in:
parent
00da04b4d4
commit
c788061976
2 changed files with 3 additions and 3 deletions
2
API.md
2
API.md
|
@ -164,7 +164,7 @@ Input:
|
|||
"password": <user-password>,
|
||||
"email": <email>,
|
||||
"rank": <rank>,
|
||||
"avatar_style": <avatar-style>
|
||||
"avatarStyle": <avatar-style>
|
||||
}
|
||||
```
|
||||
Files: `avatar` - the content of the new avatar.
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue