Commit 4ed7981c authored by Xiaowu Zhang's avatar Xiaowu Zhang

upload jio.js

parent 29533cc8
......@@ -3569,7 +3569,7 @@ function enableRestParamChecker(jio, shared) {
}
});
["getAttachment", "removeAttachment"].forEach(function (method) {
["removeAttachment"].forEach(function (method) {
shared.on(method, function (param) {
if (!checkId(param)) {
checkAttachmentId(param);
......@@ -3577,6 +3577,26 @@ function enableRestParamChecker(jio, shared) {
});
});
["getAttachment"].forEach(function (method) {
shared.on(method, function (param) {
if (param.storage_spec.type !== "indexeddb" &&
param.storage_spec.type !== "dav" &&
(param.kwargs._start !== undefined
|| param.kwargs._end !== undefined)) {
restCommandRejecter(param, [
'bad_request',
'unsupport',
'_start, _end not support'
]);
return false;
}
if (!checkId(param)) {
checkAttachmentId(param);
}
});
});
["check", "repair"].forEach(function (method) {
shared.on(method, function (param) {
if (param.kwargs._id !== undefined) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment