You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-10-06 22:17:10 +02:00
Clipper: Fixes #1417: Sort the folders in the same order as the desktop app
This commit is contained in:
@@ -14,6 +14,7 @@ const HtmlToMd = require('lib/HtmlToMd');
|
||||
const { fileExtension, safeFileExtension, safeFilename, filename } = require('lib/path-utils');
|
||||
const ApiResponse = require('lib/services/rest/ApiResponse');
|
||||
const SearchEngineUtils = require('lib/services/SearchEngineUtils');
|
||||
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
|
||||
|
||||
class ApiError extends Error {
|
||||
|
||||
@@ -221,7 +222,9 @@ class Api {
|
||||
|
||||
async action_folders(request, id = null, link = null) {
|
||||
if (request.method === 'GET' && !id) {
|
||||
return await Folder.allAsTree({ fields: this.fields_(request, ['id', 'parent_id', 'title']) });
|
||||
const folders = await FoldersScreenUtils.allForDisplay({ fields: this.fields_(request, ['id', 'parent_id', 'title']) });
|
||||
const output = await Folder.allAsTree(folders);
|
||||
return output;
|
||||
}
|
||||
|
||||
if (request.method === 'GET' && id) {
|
||||
|
Reference in New Issue
Block a user