Refactored post handling/updating on both the client and server.
Этот коммит содержится в:
@@ -653,7 +653,7 @@ module.exports.executeCommand = function(channelId, command, suggest, success, e
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.getPosts = function(channelId, offset, limit, success, error, complete) {
|
||||
module.exports.getPostsPage = function(channelId, offset, limit, success, error, complete) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
url: '/api/v1/channels/' + channelId + '/posts/' + offset + '/' + limit,
|
||||
@@ -669,6 +669,21 @@ module.exports.getPosts = function(channelId, offset, limit, success, error, com
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.getPosts = function(channelId, since, success, error, complete) {
|
||||
$.ajax({
|
||||
url: '/api/v1/channels/' + channelId + '/posts/' + since,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
ifModified: true,
|
||||
success: success,
|
||||
error: function onError(xhr, status, err) {
|
||||
var e = handleError('getPosts', xhr, status, err);
|
||||
error(e);
|
||||
},
|
||||
complete: complete
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.getPost = function(channelId, postId, success, error) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
|
||||
Ссылка в новой задаче
Block a user