@xuda.io/drive_module 1.1.1363 → 1.1.1365
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +4 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -277,7 +277,7 @@ export const get_drive_files = async (req) => {
|
|
|
277
277
|
const get_user_files = async () => {
|
|
278
278
|
opt.selector.docType = 'user_drive';
|
|
279
279
|
opt.selector.uid = uid;
|
|
280
|
-
const ret = await
|
|
280
|
+
const ret = await find_contact_query(uid, opt);
|
|
281
281
|
const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
|
|
282
282
|
return {
|
|
283
283
|
code: 1,
|
|
@@ -1314,7 +1314,7 @@ export const check_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
case 'user': {
|
|
1316
1316
|
selector.docType = 'user_drive';
|
|
1317
|
-
const user_drive_res = await
|
|
1317
|
+
const user_drive_res = await find_contact_query(uid, {
|
|
1318
1318
|
selector,
|
|
1319
1319
|
limit: 99,
|
|
1320
1320
|
});
|
|
@@ -1458,13 +1458,14 @@ const validate_drive_type = (drive_type) => {
|
|
|
1458
1458
|
};
|
|
1459
1459
|
|
|
1460
1460
|
export const run_drive_pending_ocr = async (req) => {
|
|
1461
|
+
const { uid } = req;
|
|
1461
1462
|
try {
|
|
1462
1463
|
let opt = {
|
|
1463
1464
|
selector: { docType: 'user_drive', ocr_stat: 1, stat: 3 },
|
|
1464
1465
|
limit: 1,
|
|
1465
1466
|
};
|
|
1466
1467
|
|
|
1467
|
-
const user_drive_res = await
|
|
1468
|
+
const user_drive_res = await find_contact_query(uid, opt);
|
|
1468
1469
|
for await (let doc of user_drive_res.docs) {
|
|
1469
1470
|
await ocr_drive_file(null, doc);
|
|
1470
1471
|
}
|