Do not send back saveSingleFile: true
if saving a PDF snapshot. (#1950)
This commit is contained in:
parent
293bf07c03
commit
55acf9a0c0
2 changed files with 8 additions and 3 deletions
|
@ -1143,7 +1143,9 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
|
||||||
return 500;
|
return 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [201, "application/json", JSON.stringify({ saveSingleFile: !data.skipSnapshot })];
|
return [201,
|
||||||
|
"application/json",
|
||||||
|
JSON.stringify({ saveSingleFile: !data.skipSnapshot && !data.pdf })];
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1359,7 +1359,7 @@ describe("Connector Server", function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
await Zotero.HTTP.request(
|
let response = await Zotero.HTTP.request(
|
||||||
'POST',
|
'POST',
|
||||||
connectorServerPath + "/connector/saveSnapshot",
|
connectorServerPath + "/connector/saveSnapshot",
|
||||||
{
|
{
|
||||||
|
@ -1368,10 +1368,13 @@ describe("Connector Server", function () {
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
url: testServerPath + "/test.pdf",
|
url: testServerPath + "/test.pdf",
|
||||||
pdf: true
|
pdf: true,
|
||||||
|
singleFile: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
let json = JSON.parse(response.responseText);
|
||||||
|
assert.propertyVal(json, 'saveSingleFile', false);
|
||||||
|
|
||||||
var ids = await promise;
|
var ids = await promise;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue