Skip to content

Commit 0b3da9d

Browse files
authored
Update gitapi.js
1 parent eb2e59b commit 0b3da9d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

git/gitapi.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ const beforeUnloadListener = (event) => {
2424

2525
let git = {
2626

27+
// get big file
28+
'getBigFile': async (treeLoc, sha) => {
29+
30+
// map tree location
31+
let query = 'https://api.github.com';
32+
const [user, repo, contents] = treeLoc;
33+
34+
query += '/repos/'+ user +'/'+ repo +'/git/blobs/'+ sha;
35+
36+
// get the query
37+
const resp = await axios.get(query, gitToken);
38+
39+
return resp;
40+
41+
},
42+
2743
// get file
2844
'getFile': async (treeLoc, fileName) => {
2945

0 commit comments

Comments
 (0)