mirror of https://gitlab.com/litecord/litecord.git
schemas: fix syntax error, add required to REGISTER
This commit is contained in:
parent
e949dbdc3f
commit
d0b8dd9f56
|
|
@ -151,14 +151,15 @@ def validate(reqjson: Union[Dict, List], schema: Dict,
|
||||||
|
|
||||||
|
|
||||||
REGISTER = {
|
REGISTER = {
|
||||||
'email': {'type': 'email'},
|
'email': {'type': 'email', 'required': True},
|
||||||
'username': {'type': 'username'},
|
'username': {'type': 'username', 'required': True},
|
||||||
'password': {'type': 'string', 'minlength': 5}
|
'password': {'type': 'string', 'minlength': 5, 'required': True}
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_WITH_INVITE = {**REGISTER, **{
|
REGISTER_WITH_INVITE = {**REGISTER, **{
|
||||||
'invcode': {'type': 'string', 'required': True}
|
'invcode': {'type': 'string', 'required': True}
|
||||||
}
|
}}
|
||||||
|
|
||||||
|
|
||||||
USER_UPDATE = {
|
USER_UPDATE = {
|
||||||
'username': {
|
'username': {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue