mirror of https://github.com/laurent22/joplin.git
Clipper: Upgraded clipper to support API pagination
This version of the clipper will support both new and old Joplin clients, so as to ease the transition.fix_onedrive_auth
parent
6a068a90b2
commit
0ec3d6ca9d
|
@ -55,7 +55,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "node scripts/start.js",
|
||||
"build": "SKIP_PREFLIGHT_CHECK=true node scripts/build.js",
|
||||
"build": "node scripts/build.js SKIP_PREFLIGHT_CHECK",
|
||||
"test": "node scripts/test.js --env=jsdom",
|
||||
"watch": "cra-build-watch",
|
||||
"postinstall": "node postinstall.js && npm run build"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
if (process.argv && process.argv.indexOf('SKIP_PREFLIGHT_CHECK') >= 0) {
|
||||
process.env.SKIP_PREFLIGHT_CHECK = 'true';
|
||||
}
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'production';
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
|
|
@ -148,10 +148,10 @@ class Bridge {
|
|||
this.dispatch({ type: 'CLIPPER_SERVER_SET', foundState: 'found', port: state.port });
|
||||
|
||||
const folders = await this.folderTree();
|
||||
this.dispatch({ type: 'FOLDERS_SET', folders: folders });
|
||||
this.dispatch({ type: 'FOLDERS_SET', folders: folders.items ? folders.items : folders });
|
||||
|
||||
const tags = await this.clipperApiExec('GET', 'tags');
|
||||
this.dispatch({ type: 'TAGS_SET', tags: tags });
|
||||
this.dispatch({ type: 'TAGS_SET', tags: tags.items ? tags.items : tags });
|
||||
|
||||
bridge().restoreState();
|
||||
return;
|
||||
|
@ -245,7 +245,7 @@ class Bridge {
|
|||
}
|
||||
|
||||
async folderTree() {
|
||||
return this.clipperApiExec('GET', 'folders');
|
||||
return this.clipperApiExec('GET', 'folders', { as_tree: 1 });
|
||||
}
|
||||
|
||||
async storageSet(keys) {
|
||||
|
|
Loading…
Reference in New Issue