mirror of
https://github.com/pomber/git-history.git
synced 2024-09-11 14:35:57 +03:00
Fix base64 decode
This commit is contained in:
parent
e4ea3a1f6b
commit
0b043a6a4c
@ -4,6 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"diff": "^4.0.1",
|
"diff": "^4.0.1",
|
||||||
|
"js-base64": "^2.5.1",
|
||||||
"netlify-auth-providers": "^1.0.0-alpha5",
|
"netlify-auth-providers": "^1.0.0-alpha5",
|
||||||
"prismjs": "^1.15.0",
|
"prismjs": "^1.15.0",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { getLanguageDependencies } from "./language-detector";
|
|
||||||
import netlify from "netlify-auth-providers";
|
import netlify from "netlify-auth-providers";
|
||||||
|
import { Base64 } from "js-base64";
|
||||||
|
import { getLanguageDependencies } from "./language-detector";
|
||||||
const TOKEN_KEY = "github-token";
|
const TOKEN_KEY = "github-token";
|
||||||
|
|
||||||
function getHeaders() {
|
function getHeaders() {
|
||||||
@ -21,7 +22,7 @@ async function getContent(repo, sha, path) {
|
|||||||
throw contentResponse;
|
throw contentResponse;
|
||||||
}
|
}
|
||||||
const contentJson = await contentResponse.json();
|
const contentJson = await contentResponse.json();
|
||||||
const content = window.atob(contentJson.content);
|
const content = Base64.decode(contentJson.content);
|
||||||
return { content, url: contentJson.html_url };
|
return { content, url: contentJson.html_url };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5595,6 +5595,11 @@ joi@^11.1.1:
|
|||||||
isemail "3.x.x"
|
isemail "3.x.x"
|
||||||
topo "2.x.x"
|
topo "2.x.x"
|
||||||
|
|
||||||
|
js-base64@^2.5.1:
|
||||||
|
version "2.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
|
||||||
|
integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==
|
||||||
|
|
||||||
js-levenshtein@^1.1.3:
|
js-levenshtein@^1.1.3:
|
||||||
version "1.1.4"
|
version "1.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e"
|
resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e"
|
||||||
|
Loading…
Reference in New Issue
Block a user