'Automation of my own smart contract transfer function

I have my own smart contract that has the transfer function in it. I want to write some javascript function that can only be called from my other application that will automatically approve and send the tokens to a wallet. I want this to happen without any manual approval for each transaction by me as the owner of the smart contract. How can this be done?

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source