WIP post diffs

This commit is contained in:
Julian Lam
2018-02-16 16:41:06 -05:00
parent 55788382ea
commit 501fc3cee9
6 changed files with 72 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ require('./posts/move')(SocketPosts);
require('./posts/votes')(SocketPosts);
require('./posts/bookmarks')(SocketPosts);
require('./posts/tools')(SocketPosts);
require('./posts/diffs')(SocketPosts);
SocketPosts.reply = function (socket, data, callback) {
if (!data || !data.tid || (parseInt(meta.config.minimumPostLength, 10) !== 0 && !data.content)) {

View File

@@ -0,0 +1,13 @@
'use strict';
var posts = require('../../posts');
module.exports = function (SocketPosts) {
SocketPosts.getDiffs = function (socket, data, callback) {
posts.diffs.list(data.pid, callback);
};
SocketPosts.showPostAt = function (socket, data, callback) {
posts.diffs.load(data.pid, data.since, callback);
};
};