Thanks for reaching out to Q&A.
For enabling easy auth in the Azure function, there are no code changes required on the existing Functions code. The change that you have made can be kept as is. However, if you are calling this http trigger function from another app, then you need to make changes to code of the caller app.
Please refer to the following article that shows how to call a easyauth enabled function api
https://stackoverflow.com/questions/56570231/how-to-call-an-azure-function-app-api-with-easy-auth-enables-using-active-direct
I hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.