add prefix "_" to "named" IDs

This commit is contained in:
zadam
2022-12-21 16:11:00 +01:00
parent 1b24276a4a
commit 724f99f17c
49 changed files with 215 additions and 192 deletions

View File

@@ -104,11 +104,11 @@ function getAndValidateParent(params) {
throw new ValidationError(`Creating child notes into launcher notes is not allowed.`);
}
if (['lbAvailableLaunchers', 'lbVisibleLaunchers'].includes(params.parentNoteId) && params.type !== 'launcher') {
if (['_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(params.parentNoteId) && params.type !== 'launcher') {
throw new ValidationError(`Only 'launcher' notes can be created in parent '${params.parentNoteId}'`);
}
if (!params.ignoreForbiddenParents && (['lbRoot', 'hidden'].includes(parentNote.noteId) || parentNote.isOptions())) {
if (!params.ignoreForbiddenParents && (['_lbRoot', '_hidden'].includes(parentNote.noteId) || parentNote.isOptions())) {
throw new ValidationError(`Creating child notes into '${parentNote.noteId}' is not allowed.`);
}