feat: add embeds

This commit is contained in:
Xyphyn committed 2023-10-05 16:21:30 -07:00
1 parent ec72b62c0b
commit 869afbd0cb
8 files changed
+110 -48

No files matched your search

+7 -3
View File
@@ -34,9 +34,13 @@ async function customFetch(
const f = func ? func : fetch
if (init?.body && auth) {
const json = JSON.parse(init.body.toString())
json.auth = auth
init.body = JSON.stringify(json)
try {
const json = JSON.parse(init.body.toString())
json.auth = auth
init.body = JSON.stringify(json)
} catch (e) {
// It seems this isn't a JSON request. Ignore adding an auth parameter.
}
}
const url = toURL(input)