Merge 9da564feef
into 359a6a5762
This commit is contained in:
commit
127f22716d
|
@ -898,7 +898,7 @@ module.exports = function(registry) {
|
|||
}
|
||||
|
||||
if (options.trackChanges || options.enableRemoteReplication) {
|
||||
setRemoting(PersistedModel, 'diff', {
|
||||
var diffOptions = {
|
||||
description: 'Get a set of deltas and conflicts since the given checkpoint.',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
|
@ -908,7 +908,14 @@ module.exports = function(registry) {
|
|||
],
|
||||
returns: {arg: 'result', type: 'object', root: true},
|
||||
http: {verb: 'post', path: '/diff'},
|
||||
});
|
||||
};
|
||||
// The since argument is not passed in remote requests
|
||||
// set options.explicitSinceSource to true in model config
|
||||
// to explicitly set argument source and ensure its passed
|
||||
if (options.explicitSinceSource) {
|
||||
diffOptions.accepts[0].http = {source: 'query'};
|
||||
}
|
||||
setRemoting(PersistedModel, 'diff', diffOptions);
|
||||
|
||||
setRemoting(PersistedModel, 'changes', {
|
||||
description: 'Get the changes to a model since a given checkpoint.' +
|
||||
|
|
Loading…
Reference in New Issue