Skip to content

Commit 7af152a

Browse files
committed
skibidi idiot
1 parent 9904e4b commit 7af152a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pages/get-gist-first-file-text.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ export const getGistFirstFileText = async url => {
33
try {
44
const { data: gistData, error: gistError } = await xmlGetHttpRequest(url)
55
if (gistError) res({ error: gistError })
6-
76
// ─────────────────────────────────────────────────────
87
// 1. find raw link
98
const html = JSON.parse(gistData).div
9+
console.log(html)
1010
let rawLink = ""
1111
html.split('href="').forEach(text => {
1212
const link = text.split('"')[0]
13+
console.log(link)
1314
if (link.includes("/raw/")) rawLink = link
1415
})
1516
if (!rawLink) res({ error: "raw link not found" })
@@ -22,6 +23,7 @@ export const getGistFirstFileText = async url => {
2223
// ─────────────────────────────────────────────────────
2324

2425
res({ data: rawData })
26+
console.log(data)
2527
} catch (e) {
2628
res({ error: String(e) })
2729
}

0 commit comments

Comments
 (0)