confimration mail at end of launch process

This commit is contained in:
2025-06-20 13:36:45 +02:00
parent c9d1d7416b
commit f825bab894
5 changed files with 192 additions and 28 deletions

View File

@@ -550,8 +550,12 @@ def generate_password_reset_token(current_user, user_id):
db.session.add(reset_token)
db.session.commit()
# Get the instance URL from the request data or use the current host
data = request.get_json() or {}
instance_url = data.get('instance_url', request.host_url.rstrip('/'))
# Return the token and reset URL
reset_url = f"{request.host_url.rstrip('/')}/reset-password/{token}"
reset_url = f"{instance_url}/reset-password/{token}"
return jsonify({
'message': 'Password reset token generated successfully',