Open asiyani opened 7 years ago
It didn't work until I called, /api/repos/v1/updateRecord
manually. We need to find a method to overcome this.
Language selection is not working.
After a point application exits due to undefined response body
Ya some of the language doesn't work becz dB doesn't have any repo for that language. Which one you tried?does it work on previous front end?
It's not working for Javascript. It was working previously.
I think its something to do with scroll, if you scroll down it starts doing API calls. Not sure why this is happening....
It's working now. I don't know why it was happening.
Username array isn't stored in DB. Is it?
No its just a file for now, but DB got all github info regarding those usernames.....
If the user wants to add new username, it's not possible now.
Regarding adding username on end user request is not yet possible but I was Thinking if user wants to add username we will let him add that but only for him like temp data. we will add it to our DB only if they it meet certain criteria. something like how many follower he got or count of repo. Otherwise our starzagers list will grow and we will loose quality.
@alejandronanez @asiyani Status?
Sorry guys have been busy for last few days. I have made all changes now. Let me know if anything else needs changing.
Hi guys did you had time to review this? Let me know if any issue
After merging this pull request Frontend will get data from backend DB. Created Search API for front-end - (This one is not GraphQL) but some this for now just to use same front end without much modification.
Folders added.
gitUtility
inserver
foldergitService
file will make external git API calls. 2 function we can usegetUserDetails(login, token)
&getStarredRepository(login, token, page = 1)
.initialSeed.js
for initail seeding data or udpating records in future.created static method
updateRepoWithStargazer
in repositorySchema which we can use to update records in DB. this method will link Stargazer to Repos being updated./api/repos/v1/search
to search db with query parameterstargazer
,language
,page
,per_page
. this is to replicate current API we are doing to Github./api/repos/v1/updateRecord
this is to start DB seeding.Note:
We need to seed our DB for
/api/repos/v1/search
to work. To do that i have created simple call we can make from the browser (after login in). Just go tohttp://localhost:3000/api/repos/v1/updateRecord
. this will start seeding process and you will get logs on the terminal. I am doing seeding for ALL starred records. some username got about 1K+ starred repos.I got about 11K repos documents in Repository collections. This process might take some time.After seeding data front end will work as it is working now- just data will come from our db. Since we are getting data from our server we can do following.
In the front-end, we need to change they way we do API calls when language is selected. Since now we can pass
language
as search parameter No need to filter that on the front-end.Please let me know if any issue or what you guys think about this process of getting data.