1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Chore: Apply eslint rules

This commit is contained in:
Laurent Cozic
2019-09-19 22:51:18 +01:00
parent ab29d7e872
commit e648392330
185 changed files with 1196 additions and 1196 deletions

View File

@ -34,7 +34,7 @@ class ResourceService extends BaseService {
if (!changes.length) break;
const noteIds = changes.map(a => a.item_id);
const notes = await Note.modelSelectAll('SELECT id, title, body, encryption_applied FROM notes WHERE id IN ("' + noteIds.join('","') + '")');
const notes = await Note.modelSelectAll(`SELECT id, title, body, encryption_applied FROM notes WHERE id IN ("${noteIds.join('","')}")`);
const noteById = noteId => {
for (let i = 0; i < notes.length; i++) {
@ -66,12 +66,12 @@ class ResourceService extends BaseService {
if (note) {
await this.setAssociatedResources_(note);
} else {
this.logger().warn('ResourceService::indexNoteResources: A change was recorded for a note that has been deleted: ' + change.item_id);
this.logger().warn(`ResourceService::indexNoteResources: A change was recorded for a note that has been deleted: ${change.item_id}`);
}
} else if (change.type === ItemChange.TYPE_DELETE) {
await NoteResource.remove(change.item_id);
} else {
throw new Error('Invalid change type: ' + change.type);
throw new Error(`Invalid change type: ${change.type}`);
}
Setting.setValue('resourceService.lastProcessedChangeId', change.id);