server/users: fix avatarStyle letter case in json
This commit is contained in:
parent
00da04b4d4
commit
c788061976
2
API.md
2
API.md
|
@ -164,7 +164,7 @@ Input:
|
||||||
"password": <user-password>,
|
"password": <user-password>,
|
||||||
"email": <email>,
|
"email": <email>,
|
||||||
"rank": <rank>,
|
"rank": <rank>,
|
||||||
"avatar_style": <avatar-style>
|
"avatarStyle": <avatar-style>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Files: `avatar` - the content of the new avatar.
|
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)
|
auth.verify_privilege(context.user, 'users:edit:%s:rank' % infix)
|
||||||
users.update_rank(user, context.request['rank'], context.user)
|
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)
|
auth.verify_privilege(context.user, 'users:edit:%s:avatar' % infix)
|
||||||
users.update_avatar(
|
users.update_avatar(
|
||||||
user,
|
user,
|
||||||
context.request['avatar_style'],
|
context.request['avatarStyle'],
|
||||||
context.files.get('avatar') or None)
|
context.files.get('avatar') or None)
|
||||||
|
|
||||||
context.session.commit()
|
context.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue