mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Update archive.js
This commit is contained in:
parent
e117e38bac
commit
b8970020b9
@ -128,10 +128,13 @@ module.exports.export = (Ticket, channel) => new Promise((resolve, reject) => {
|
|||||||
data.messages[index] = message;
|
data.messages[index] = message;
|
||||||
}, () => {
|
}, () => {
|
||||||
let endpoint = config.transcripts.web.server;
|
let endpoint = config.transcripts.web.server;
|
||||||
|
|
||||||
if (endpoint[endpoint.length - 1] === '/')
|
if (endpoint[endpoint.length - 1] === '/')
|
||||||
endpoint = endpoint.slice(0, -1);
|
endpoint = endpoint.slice(0, -1);
|
||||||
|
|
||||||
endpoint += `/${data.ticket.creator}/${data.ticket.channel}/?key=${process.env.ARCHIVES_KEY}`;
|
endpoint += `/${data.ticket.creator}/${data.ticket.channel}/?key=${process.env.ARCHIVES_KEY}`;
|
||||||
fetch(endpoint, {
|
|
||||||
|
fetch(encodeURI(endpoint), {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
Loading…
Reference in New Issue
Block a user