File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " api"
3- version = " 0.2.0 "
3+ version = " 0.2.1 "
44description = " "
55authors = [" ArielMAJ <ariel.maj@hotmail.com>" ]
66readme = " README.md"
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ async def data(username: str):
3737 "hole" : ".4" ,
3838 }
3939 ]
40- await asyncio .sleep (3 )
40+ await asyncio .sleep (random () * 7 )
4141 return {"forks" : forks }
4242
4343
Original file line number Diff line number Diff line change 11{
22 "name" : " docs" ,
3- "version" : " 0.2.0 " ,
3+ "version" : " 0.2.1 " ,
44 "private" : true ,
55 "scripts" : {
66 "serve" : " vue-cli-service serve" ,
Original file line number Diff line number Diff line change @@ -45,25 +45,20 @@ export default {
4545 },
4646 async mounted () {
4747 try {
48- const [data1 , data2 , data3 ] = await Promise .all ([
49- this .fetchData (),
50- this .fetchData (),
51- this .fetchData (),
52- ]);
48+ this .fetchData (' a' ).then ((data ) => data .json ()).then (json => this .plotInfo1 .data = json .forks )
49+ this .fetchData (' b' ).then ((data ) => data .json ()).then (json => this .plotInfo2 .data = json .forks )
50+ this .fetchData (' c' ).then ((data ) => data .json ()).then (json => this .plotInfo3 .data = json .forks )
5351
54- this .plotInfo1 .data = (await data1 .json ()).forks ;
55- this .plotInfo2 .data = (await data2 .json ()).forks ;
56- this .plotInfo3 .data = (await data3 .json ()).forks ;
5752 } catch (error) {
5853 console .error (" Error fetching data:" , error);
5954 }
6055 },
6156 methods: {
62- async fetchData () {
57+ async fetchData (username ) {
6358 try {
64- console .log (" Fetching data..." );
59+ console .log (" Fetching data..." , process . env . VUE_APP_BACKEND_ROOT_ENDPOINT + ` ${ username } /repos ` );
6560 return fetch (
66- process .env .VUE_APP_BACKEND_ROOT_ENDPOINT + " ArielMAJ /repos"
61+ process .env .VUE_APP_BACKEND_ROOT_ENDPOINT + ` ${ username } /repos`
6762 );
6863 } catch (error) {
6964 console .error (" Error fetching data:" , error);
You can’t perform that action at this time.
0 commit comments