From f91b823eccb6f132d040b59f8bbf9c9f0cfd5c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 14 Dec 2023 10:13:19 -0500 Subject: [PATCH] refactor: replace deprecated call with api call --- public/src/client/topic/replies.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/client/topic/replies.js b/public/src/client/topic/replies.js index 617eea3d0b..a70862c119 100644 --- a/public/src/client/topic/replies.js +++ b/public/src/client/topic/replies.js @@ -1,7 +1,7 @@ 'use strict'; -define('forum/topic/replies', ['forum/topic/posts', 'hooks', 'alerts'], function (posts, hooks, alerts) { +define('forum/topic/replies', ['forum/topic/posts', 'hooks', 'alerts', 'api'], function (posts, hooks, alerts, api) { const Replies = {}; Replies.init = function (button) { @@ -14,8 +14,8 @@ define('forum/topic/replies', ['forum/topic/posts', 'hooks', 'alerts'], function if (open.is(':not(.hidden)') && loading.is('.hidden')) { open.addClass('hidden'); loading.removeClass('hidden'); - - socket.emit('posts.getReplies', pid, function (err, postData) { + api.get(`/posts/${pid}/replies`, {}, function (err, { replies }) { + const postData = replies; loading.addClass('hidden'); if (err) { open.removeClass('hidden');