mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
fix(rest/request_manager): pass authorization header instead (#534)
* fix big brain bot auth on proxy rest * whoops * fix header
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { authorization, eventHandlers } from "../bot.ts";
|
||||
import { authorization, eventHandlers, restAuthorization } from "../bot.ts";
|
||||
import {
|
||||
Errors,
|
||||
FileContent,
|
||||
@@ -221,7 +221,13 @@ function runMethod(
|
||||
!url.startsWith(`${BASE_URL}/v${API_VERSION}`) &&
|
||||
!url.startsWith(IMAGE_BASE_URL)
|
||||
) {
|
||||
return fetch(url, { method, body: body ? JSON.stringify(body) : undefined })
|
||||
return fetch(url, {
|
||||
method,
|
||||
body: body ? JSON.stringify(body) : undefined,
|
||||
headers: {
|
||||
authorization: restAuthorization,
|
||||
},
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user