♻️ refactor: Remove useless API call

This commit is contained in:
Dominic Harris 2022-03-25 21:25:03 -04:00
parent 1b4da8955d
commit dc5c178152
No known key found for this signature in database
GPG Key ID: 93CCF85F3E2A4F65
1 changed files with 6 additions and 10 deletions

View File

@ -209,17 +209,13 @@ async function duplicatePaste() {
const path = window.location.pathname
const split = path.split("/")
const id = split[split.length - 1]
await getPaste(id, function (err, res) {
if (err) {
return
}
const content = res["data"]["content"]
window.history.pushState(null, "", "/")
newPaste()
rawContent = content
editor.value = content
})
const content = rawContent
window.history.pushState(null, "", "/")
newPaste()
rawContent = content
editor.value = content
}
saveButton.addEventListener("click", async function () {