The functions executed by the 'CRON' task should be moved to the API. This will eliminate the current segmentation and code duplication. The 'CRON' task should instead create an HTTP request to the corresponding API routes (also explore alternative scheduling methods).
Task and Proposed API Routes:
twitch_oauth() -> /twitch/oauth/update
twitch_subscribe() -> /twitch/subscriptions/update
youtube_subscribe() -> /youtube/subscriptions/update
The functions executed by the 'CRON' task should be moved to the API. This will eliminate the current segmentation and code duplication. The 'CRON' task should instead create an HTTP request to the corresponding API routes (also explore alternative scheduling methods).
Task and Proposed API Routes: twitch_oauth() -> /twitch/oauth/update
twitch_subscribe() -> /twitch/subscriptions/update youtube_subscribe() -> /youtube/subscriptions/update