Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arc9693 opened this issue Oct 1, 2020 · 5 comments
Open

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

arc9693 opened this issue Oct 1, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest

Comments

@arc9693
Copy link
Member

arc9693 commented Oct 1, 2020

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.

$.getJSON('https://raw.githubusercontent.com/lugnitdgp/Hack-Day/2020/data.json', (data) => {

A similar change is required in the following file:

$.getJSON('https://raw.githubusercontent.com/lugnitdgp/Hack-Day/2020/repos.json', (data) => {

@arc9693 arc9693 added enhancement New feature or request good first issue Good for newcomers Hacktoberfest labels Oct 1, 2020
@therealansh
Copy link

Hey @arc9693 can i work on this one? Thanks

@arc9693
Copy link
Member Author

arc9693 commented Oct 1, 2020

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

@therealansh
Copy link

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
Copy link

Rajdeepc commented Oct 1, 2020

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

@ujalak1812
Copy link

@arc9693 I have created a PR, kindly review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants