refactor: use user-token for historyDelete too
Previously, the user token was only used for the endpoint to delete the user itself. This commit adds that token to the history deletion as well. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
@@ -295,7 +295,7 @@ export function postHistoryToServer (noteId, data, callback) {
|
||||
|
||||
export function deleteServerHistory (noteId, callback) {
|
||||
$.ajax({
|
||||
url: `${serverurl}/history${noteId ? '/' + noteId : ''}`,
|
||||
url: `${serverurl}/history${noteId ? '/' + noteId : ''}?token=${window.userToken}`,
|
||||
type: 'DELETE'
|
||||
})
|
||||
.done(result => callback(null, result))
|
||||
|
||||
@@ -11,3 +11,4 @@ window.linkifyHeaderStyle = '<%- linkifyHeaderStyle %>'
|
||||
window.DROPBOX_APP_KEY = '<%- DROPBOX_APP_KEY %>'
|
||||
|
||||
window.cookiePolicy = '<%- cookiePolicy %>'
|
||||
window.userToken = '<%- userToken %>'
|
||||
|
||||
Reference in New Issue
Block a user