breaking: remove deprecated post diff socket calls

This commit is contained in:
Barış Soner Uşaklı
2021-11-28 19:45:29 -05:00
parent 324262cbb5
commit 8117b7f22f
3 changed files with 18 additions and 39 deletions

View File

@@ -22,7 +22,6 @@ require('./posts/move')(SocketPosts);
require('./posts/votes')(SocketPosts);
require('./posts/bookmarks')(SocketPosts);
require('./posts/tools')(SocketPosts);
require('./posts/diffs')(SocketPosts);
SocketPosts.reply = async function (socket, data) {
sockets.warnDeprecated(socket, 'POST /api/v3/topics/:tid');

View File

@@ -1,21 +0,0 @@
'use strict';
const api = require('../../api');
const websockets = require('..');
module.exports = function (SocketPosts) {
SocketPosts.getDiffs = async function (socket, data) {
websockets.warnDeprecated(socket, 'GET /api/v3/posts/:pid/diffs');
return await api.posts.getDiffs(socket, data);
};
SocketPosts.showPostAt = async function (socket, data) {
websockets.warnDeprecated(socket, 'GET /api/v3/posts/:pid/diffs/:since');
return await api.posts.loadDiff(socket, data);
};
SocketPosts.restoreDiff = async function (socket, data) {
websockets.warnDeprecated(socket, 'PUT /api/v3/posts/:pid/diffs/:since');
return await api.posts.restoreDiff(socket, data);
};
};