ApplicantPortal/app/routes.py
2025-03-12 20:43:26 -06:00

19 lines
455 B
Python

from flask import Blueprint, render_template
from flask_jwt_extended import current_user, jwt_required, get_jwt_identity
blueprint = Blueprint('main', __name__)
@blueprint.route('/')
@blueprint.route('/index')
@jwt_required(optional=True)
def index():
try:
user_id = get_jwt_identity()
except:
user_id = None
if current_user:
user_id = current_user.user_id
return render_template('index.html', user_id=user_id)