Closed Zircoz closed 2 years ago
@shriyaMadan may I get assigned to this ?
Yes, you may start working on this, it will avoid redundancy.
@Zircoz updates, please?
Sorry for the delay, didn't get time to do it. Hence, I am unassigning myself.
You could have told beforehand @Zircoz
You could have told beforehand @Zircoz
Will do from next time
I want to work on this
Cn you please explain what excatly you want ?
There are many redundant operations in controller, for example: https://github.com/shriyaMadan/Youtube-Dashboard/blob/f4b694a4a54b769201acf4ba3b385d83ba2e3163/controllers/controls.js#L97 to https://github.com/shriyaMadan/Youtube-Dashboard/blob/f4b694a4a54b769201acf4ba3b385d83ba2e3163/controllers/controls.js#L108 can be replaced with with
url ="https://www.googleapis.com/youtube/v3/channels?part=statistics,snippet&" + typeOfParam+ param + "&key=" + key
this issue's solver is supposed to identify them and replace them with better code
https://github.com/shriyaMadan/Youtube-Dashboard/blob/f4b694a4a54b769201acf4ba3b385d83ba2e3163/controllers/controls.js#L72 is checking if a url is entered or channel name, the type of url entered and is forming api request according to the link posted, make this identification of channel's link type a separate function to make re using the logic easier.
@Dhriti-Roy
✨ Proposal
Right now, the controllers are written separately while each one is doing pretty much the same (or similar operation). We can merge this functionality into one pure function. Read what are pure functions here: https://www.freecodecamp.org/news/functional-programming-principles-in-javascript-1b8fc6c3563f/
Have you read the Contributing Guidelines on Pull Requests?
Yeah yeah