1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Support for Joplin Cloud recursive linked notes

This commit is contained in:
Laurent Cozic
2022-04-03 19:19:24 +01:00
parent a79bc69604
commit 9d9420a35c
8 changed files with 72 additions and 56 deletions

View File

@ -228,11 +228,14 @@ export default class ShareService {
}
}
public async shareNote(noteId: string): Promise<StateShare> {
public async shareNote(noteId: string, recursive: boolean): Promise<StateShare> {
const note = await Note.load(noteId);
if (!note) throw new Error(`No such note: ${noteId}`);
const share = await this.api().exec('POST', 'api/shares', {}, { note_id: noteId });
const share = await this.api().exec('POST', 'api/shares', {}, {
note_id: noteId,
recursive: recursive ? 1 : 0,
});
await Note.save({
id: note.id,