Skip to content

Commit

Permalink
fixed shortener error caused by last update, added discord log to paste
Browse files Browse the repository at this point in the history
  • Loading branch information
TannerReynolds committed Mar 20, 2019
1 parent 8aff72d commit 292fa48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server/routes/paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async function paste(req, res) {
})
})
})
if (this.monitorChannel !== null) this.bot.createMessage(this.monitorChannel, `\`\`\`MARKDOWN\n[NEW PASTE][USER]\n[SIZE](${Math.round(files.fdata.size/1024)}KB)\n[IP](${userIP})\n\`\`\`\n${protocol}://${req.headers.host}/${fileName}`)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/short.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function post(req, res) {
}
let stream = fs.createWriteStream(`${__dirname}/../uploads/${fileName}.html`)
stream.once("open", fd => {
stream.write(`<meta ${protocol}-equiv="refresh" content="0;URL='${req.body.URL}'" />`);
stream.write(`<meta http-equiv="refresh" content="0;URL='${req.body.URL}'" />`);
stream.end();
if (this.monitorChannel !== null) this.bot.createMessage(this.monitorChannel, `\`\`\`MARKDOWN\n[NEW][SHORT URL]\n[URL](${req.body.URL})\n[NEW](${req.headers.host}/${fileName})\n[IP](${userIP})\n\`\`\``)
this.log.verbose(`New Short URL: ${protocol}://${req.headers.host}/${fileName} | IP: ${userIP}`)
Expand Down

0 comments on commit 292fa48

Please sign in to comment.