Skip to content

Commit

Permalink
Refactored variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal-kumar-paswan committed May 21, 2023
1 parent 55910c0 commit 1c47b3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/crypto-price-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ exports.fetchCryptoPriceList = async (req, res) => {
cryptocurrencyDetails.name = $(crypto).find("td.Va\\(m\\).Ta\\(start\\).Px\\(10px\\).Fz\\(s\\)").text();

// Iterating to first, second and third element of the following selector to fetch the price, change and change percentage
$(crypto).find("td.Va\\(m\\).Ta\\(end\\).Pstart\\(20px\\).Fw\\(600\\).Fz\\(s\\)").each((i, price) => {
switch (i) {
$(crypto).find("td.Va\\(m\\).Ta\\(end\\).Pstart\\(20px\\).Fw\\(600\\).Fz\\(s\\)").each((index, price) => {
switch (index) {
case 0:
cryptocurrencyDetails.price = $(price).text();
break;
Expand Down

0 comments on commit 1c47b3d

Please sign in to comment.