mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: add method name to deprecation message
This commit is contained in:
@@ -64,7 +64,7 @@ module.exports = function (SocketTopics) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SocketTopics.loadMoreSortedTopics = async function (socket, data) {
|
SocketTopics.loadMoreSortedTopics = async function (socket, data) {
|
||||||
winston.warn('[deprecated] use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
winston.warn('[deprecated] SocketTopics.loadMoreSortedTopics use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
||||||
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0) {
|
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0) {
|
||||||
throw new Error('[[error:invalid-data]]');
|
throw new Error('[[error:invalid-data]]');
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ module.exports = function (SocketTopics) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SocketTopics.loadMoreFromSet = async function (socket, data) {
|
SocketTopics.loadMoreFromSet = async function (socket, data) {
|
||||||
winston.warn('[deprecated] use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
winston.warn('[deprecated] SocketTopics.loadMoreFromSet use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
||||||
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0 || !data.set) {
|
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0 || !data.set) {
|
||||||
throw new Error('[[error:invalid-data]]');
|
throw new Error('[[error:invalid-data]]');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user