add article and pubications
This commit is contained in:
@@ -94,9 +94,7 @@ def verify_code():
|
||||
return jsonify({"error": "Missing email or verification code"}), 400
|
||||
|
||||
user = users.get_user_by_email(email)
|
||||
#-----------------------------------------------> for testing only remove in prod
|
||||
#if email != 'test@test.com':
|
||||
#-----------------------------------------------> for testing only remove in prod
|
||||
|
||||
if not user or user.otp_code != code:
|
||||
entry = AuditModel(user_id=user.id, action=f"Attempt to verify code: {email}", status='401 - Invalid code!')
|
||||
audit.new_entry(entry)
|
||||
@@ -235,7 +233,8 @@ def me():
|
||||
'profile_pic': user.profile_pic,
|
||||
'created_at': user.created_at,
|
||||
'otp_code': user.otp_code,
|
||||
'otp_expiration': user.otp_expiration
|
||||
'otp_expiration': user.otp_expiration,
|
||||
'can_create_articles': user.can_create_articles
|
||||
}), 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user