PR changes - some comment clarification and code simplifying

This commit is contained in:
Leo Hemsted
2017-11-07 16:05:43 +00:00
parent a8ebb10c8e
commit 67ae1fdb7b
3 changed files with 13 additions and 8 deletions

View File

@@ -13,7 +13,10 @@ post_verify_code_schema = {
post_send_user_email_code_schema = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'description': 'POST schema for generating a 2fa email',
'description': (
'POST schema for generating a 2fa email - "to" is required for legacy purposes. '
'"next" is an optional url to redirect to on sign in'
),
'type': 'object',
'properties': {
# doesn't need 'to' as we'll just grab user.email_address. but lets keep it
@@ -28,7 +31,7 @@ post_send_user_email_code_schema = {
post_send_user_sms_code_schema = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'description': 'POST schema for generating a 2fa email',
'description': 'POST schema for generating a 2fa sms',
'type': 'object',
'properties': {
'to': {'type': ['string', 'null']},