lugnitdgp / Hack-Day

An event organised by GNU/Linux Users' Group, NIT Durgapur. Visit
https://hack-day-2020.netlify.app/
60 stars 226 forks source link

Change the path of "data.json" file in profileAdd.js #257

Open arc9693 opened 4 years ago

arc9693 commented 4 years ago

Currently, the path is the URL of the data.json file in the main repository. People who build on their local and try to add their cards, cannot see their cards until their PR is finally merged. To correct this, we have to include the relative path of the data.json file.

https://github.com/lugnitdgp/Hack-Day/blob/e296f26c67aad38497e27bcaa525d28f60968463/assets/js/profileAdd.js#L1

A similar change is required in the following file: https://github.com/lugnitdgp/Hack-Day/blob/e296f26c67aad38497e27bcaa525d28f60968463/assets/js/repoAdd.js#L2

therealansh commented 4 years ago

Hey @arc9693 can i work on this one? Thanks

arc9693 commented 4 years ago

@therealansh Go ahead. I have assigned you the issue.

therealansh commented 4 years ago

Hey @arc9693 , Using getJson to fetch data from local files would throwback an issue of CORS (cross origin request). Therefore, only https requests are possible. We could solve this issue by running the page on a localhost, by running a xampp or a lamp server

Rajdeepc commented 4 years ago

@therealansh @arc9693 Use this with your url: https://cors-anywhere.herokuapp.com/ This will bypass CORS errors from your FE calls

ujalak1812 commented 4 years ago

@arc9693 I have created a PR, kindly review it