Default to showing synced storage properties in Item::toResponseJSON()
toResponseJSON() is usually used to emulate the API, which shows md5/mtime Also fix passing of options to toJSON() from toResponseJSON()
This commit is contained in:
parent
9ba3745b94
commit
1b5c7aa6d8
|
@ -4247,7 +4247,13 @@ Zotero.Item.prototype.toJSON = function (options = {}) {
|
||||||
|
|
||||||
|
|
||||||
Zotero.Item.prototype.toResponseJSON = function (options = {}) {
|
Zotero.Item.prototype.toResponseJSON = function (options = {}) {
|
||||||
var json = this.constructor._super.prototype.toResponseJSON.apply(this, options);
|
// Default to showing synced storage properties, since that's what the API does, and this function
|
||||||
|
// is generally used to emulate the API
|
||||||
|
if (options.syncedStorageProperties === undefined) {
|
||||||
|
options.syncedStorageProperties = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var json = this.constructor._super.prototype.toResponseJSON.call(this, options);
|
||||||
|
|
||||||
// creatorSummary
|
// creatorSummary
|
||||||
var firstCreator = this.getField('firstCreator');
|
var firstCreator = this.getField('firstCreator');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user