fix: interaction requests that sent without full url

This commit is contained in:
Skillz4Killz
2023-01-26 17:55:57 +00:00
parent 9957a3f1ca
commit b6fec9c3de

View File

@@ -649,9 +649,8 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
},
async sendRequest(options) {
// console.log('sending request', options.url, rest.createRequest({ method: options.method, url: options.url, body: options.body }))
const response = await fetch(
options.url,
options.url.startsWith('https://') ? options.url : `${rest.baseUrl}/v${rest.version}${options.url}`,
rest.createRequest({ method: options.method, url: options.url, body: options.body, ...options.options }),
)