mirror of https://github.com/zer0bin-dev/zer0bin
♻️ refactor: Remove useless API call
This commit is contained in:
parent
1b4da8955d
commit
dc5c178152
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue