Use multi-item requests for full-text writes
This is necessary to get a library version after the write instead of an item version. Otherwise after a full-text write, the main library version is behind, so the next sync checks all object types for that library instead of getting a 304. Full text is batched up to 500K characters or 10 items, whichever is less. This also switches to using ?format=versions for /fulltext requests, which isn't currently necessary but reflects what it's actually doing.
This commit is contained in:
parent
a0c7cf9bee
commit
e0e744f9b1
6 changed files with 246 additions and 122 deletions
|
@ -608,7 +608,7 @@ describe("Zotero.Sync.Runner", function () {
|
|||
// Full-text syncing
|
||||
setResponse({
|
||||
method: "GET",
|
||||
url: "users/1/fulltext",
|
||||
url: "users/1/fulltext?format=versions",
|
||||
status: 200,
|
||||
headers: {
|
||||
"Last-Modified-Version": 5
|
||||
|
@ -617,7 +617,7 @@ describe("Zotero.Sync.Runner", function () {
|
|||
});
|
||||
setResponse({
|
||||
method: "GET",
|
||||
url: "users/1/publications/fulltext",
|
||||
url: "users/1/publications/fulltext?format=versions",
|
||||
status: 200,
|
||||
headers: {
|
||||
"Last-Modified-Version": 10
|
||||
|
@ -626,7 +626,7 @@ describe("Zotero.Sync.Runner", function () {
|
|||
});
|
||||
setResponse({
|
||||
method: "GET",
|
||||
url: "groups/1623562/fulltext",
|
||||
url: "groups/1623562/fulltext?format=versions",
|
||||
status: 200,
|
||||
headers: {
|
||||
"Last-Modified-Version": 15
|
||||
|
@ -635,7 +635,7 @@ describe("Zotero.Sync.Runner", function () {
|
|||
});
|
||||
setResponse({
|
||||
method: "GET",
|
||||
url: "groups/2694172/fulltext",
|
||||
url: "groups/2694172/fulltext?format=versions",
|
||||
status: 200,
|
||||
headers: {
|
||||
"Last-Modified-Version": 20
|
||||
|
@ -780,7 +780,7 @@ describe("Zotero.Sync.Runner", function () {
|
|||
});
|
||||
setResponse({
|
||||
method: "GET",
|
||||
url: "users/1/publications/fulltext",
|
||||
url: "users/1/publications/fulltext?format=versions",
|
||||
status: 200,
|
||||
headers: {
|
||||
"Last-Modified-Version": 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue