feat: add embeds
This commit is contained in:
1 parent
ec72b62c0b
commit
869afbd0cb
8 files changed
+110
-48
No files matched your search
+7
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user