I'm trying the get all orders that belonging the user that already login to the system.
I want to get the id information of the current user with the get() method below and get the order information belonging to current user from the order table. My goal is to get the current user's id from the JWT token using flask-jwt-extended.
How can I do that?
@api.route('/orders')
@jwt_required()
def get(self):
# current_user_info
user_id = current_user_info["id"]
return UserService.get_orders(user_id)