schemas: fix syntax error, add required to REGISTER

This commit is contained in:
Luna Mendes 2018-11-18 19:27:57 -03:00
parent e949dbdc3f
commit d0b8dd9f56
1 changed files with 5 additions and 4 deletions

View File

@ -151,14 +151,15 @@ def validate(reqjson: Union[Dict, List], schema: Dict,
REGISTER = {
'email': {'type': 'email'},
'username': {'type': 'username'},
'password': {'type': 'string', 'minlength': 5}
'email': {'type': 'email', 'required': True},
'username': {'type': 'username', 'required': True},
'password': {'type': 'string', 'minlength': 5, 'required': True}
}
REGISTER_WITH_INVITE = {**REGISTER, **{
'invcode': {'type': 'string', 'required': True}
}
}}
USER_UPDATE = {
'username': {