diff --git a/public/src/admin/manage/admins-mods.js b/public/src/admin/manage/admins-mods.js index 1f7ff012e2..ab873b7251 100644 --- a/public/src/admin/manage/admins-mods.js +++ b/public/src/admin/manage/admins-mods.js @@ -114,7 +114,7 @@ define('admin/manage/admins-mods', [ bootbox.confirm('[[admin/manage/users:alerts.confirm-remove-moderator]]', function (confirm) { if (confirm) { - api.delete(`/categories/${cid}/moderator/${uid}`, {}, function (err) { + api.del(`/categories/${cid}/moderator/${uid}`, {}, function (err) { if (err) { return alerts.error(err); } diff --git a/public/src/client/chats.js b/public/src/client/chats.js index f72b1e1aaa..c92bcdcb39 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -283,7 +283,7 @@ define('forum/chats', [ modal.on('click', '[data-action="kick"]', function () { const uid = parseInt(this.getAttribute('data-uid'), 10); - api.delete(`/chats/${roomId}/users/${uid}`, {}).then((body) => { + api.del(`/chats/${roomId}/users/${uid}`, {}).then((body) => { Chats.refreshParticipantsList(roomId, modal, body); }).catch(alerts.error); }); @@ -297,7 +297,7 @@ define('forum/chats', [ message: '
[[modules:chat.leave-prompt]]
[[modules:chat.leave-help]]
', callback: function (ok) { if (ok) { - api.delete(`/chats/${roomId}/users/${app.user.uid}`, {}).then(() => { + api.del(`/chats/${roomId}/users/${app.user.uid}`, {}).then(() => { // Return user to chats page. If modal, close modal. const modal = buttonEl.parents('.chat-modal'); if (modal.length) { @@ -399,7 +399,7 @@ define('forum/chats', [ Chats.leave = function (el) { const roomId = el.attr('data-roomid'); - api.delete(`/chats/${roomId}/users/${app.user.uid}`, {}).then(() => { + api.del(`/chats/${roomId}/users/${app.user.uid}`, {}).then(() => { if (parseInt(roomId, 10) === parseInt(ajaxify.data.roomId, 10)) { ajaxify.go('user/' + ajaxify.data.userslug + '/chats'); } else { diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.js index b93902e829..6acb2fb331 100644 --- a/public/src/client/chats/messages.js +++ b/public/src/client/chats/messages.js @@ -195,7 +195,7 @@ define('forum/chats/messages', [ return; } - api.delete(`/chats/${roomId}/messages/${messageId}`, {}).then(() => { + api.del(`/chats/${roomId}/messages/${messageId}`, {}).then(() => { components.get('chat/message', messageId).toggleClass('deleted', true); }).catch(alerts.error); }); diff --git a/public/src/client/flags/detail.js b/public/src/client/flags/detail.js index 70dc387d8b..29808a049d 100644 --- a/public/src/client/flags/detail.js +++ b/public/src/client/flags/detail.js @@ -50,7 +50,7 @@ define('forum/flags/detail', [ const datetime = parseInt(this.closest('[data-datetime]').getAttribute('data-datetime'), 10); bootbox.confirm('[[flags:delete-note-confirm]]', function (ok) { if (ok) { - api.delete(`/flags/${ajaxify.data.flagId}/notes/${datetime}`, {}).then((payload) => { + api.del(`/flags/${ajaxify.data.flagId}/notes/${datetime}`, {}).then((payload) => { alerts.success('[[flags:note-deleted]]'); Detail.reloadNotes(payload.notes); Detail.reloadHistory(payload.history); @@ -126,7 +126,7 @@ define('forum/flags/detail', [ case 'delete-flag': { bootbox.confirm('[[flags:delete-flag-confirm]]', function (ok) { if (ok) { - api.delete(`/flags/${ajaxify.data.flagId}`, {}).then(() => { + api.del(`/flags/${ajaxify.data.flagId}`, {}).then(() => { alerts.success('[[flags:flag-deleted]]'); ajaxify.go('flags'); }).catch(alerts.error); diff --git a/public/src/client/topic/delete-posts.js b/public/src/client/topic/delete-posts.js index 49361c4c25..0f5a1c1d9d 100644 --- a/public/src/client/topic/delete-posts.js +++ b/public/src/client/topic/delete-posts.js @@ -52,7 +52,7 @@ define('forum/topic/delete-posts', [ function deletePosts(btn, route) { btn.attr('disabled', true); - Promise.all(postSelect.pids.map(pid => api.delete(route(pid), {}))) + Promise.all(postSelect.pids.map(pid => api.del(route(pid), {}))) .then(closeModal) .catch(alerts.error) .finally(() => {