feat: add parent PIN setup functionality and email notifications
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
- Implemented User model updates to include PIN and related fields. - Created email sender utility for sending verification and reset emails. - Developed ParentPinSetup component for setting up a parent PIN with verification code. - Enhanced UserProfile and EntityEditForm components to support new features. - Updated routing to include PIN setup and authentication checks. - Added styles for new components and improved existing styles for consistency. - Introduced loading states and error handling in various components.
This commit is contained in:
@@ -4,13 +4,15 @@ import sys
|
||||
from flask import Flask, request, jsonify
|
||||
from flask_cors import CORS
|
||||
|
||||
from api.auth_api import auth_api, mail
|
||||
from api.auth_api import auth_api
|
||||
from api.child_api import child_api
|
||||
from api.image_api import image_api
|
||||
from api.reward_api import reward_api
|
||||
from api.task_api import task_api
|
||||
from api.user_api import user_api
|
||||
from config.version import get_full_version
|
||||
|
||||
from backend.utils.email_instance import email_sender
|
||||
from db.default import initializeImages, createDefaultTasks, createDefaultRewards
|
||||
from events.broadcaster import Broadcaster
|
||||
from events.sse import sse_response_for_user, send_to_user
|
||||
@@ -44,10 +46,11 @@ app.config.update(
|
||||
FRONTEND_URL='https://localhost:5173', # Adjust as needed
|
||||
SECRET_KEY='supersecretkey' # Replace with a secure key in production
|
||||
)
|
||||
mail.init_app(app)
|
||||
|
||||
CORS(app)
|
||||
|
||||
email_sender.init_app(app)
|
||||
|
||||
@app.route("/version")
|
||||
def api_version():
|
||||
return jsonify({"version": get_full_version()})
|
||||
@@ -84,6 +87,5 @@ createDefaultTasks()
|
||||
createDefaultRewards()
|
||||
start_background_threads()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=False, host='0.0.0.0', port=5000, threaded=True)
|
||||
Reference in New Issue
Block a user