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

First pass at linting lib dir

This commit is contained in:
Laurent Cozic
2019-07-29 15:43:53 +02:00
parent 64b7bc3d62
commit 86dc72b204
170 changed files with 4140 additions and 3119 deletions

View File

@ -8,7 +8,6 @@ const { Synchronizer } = require('lib/synchronizer.js');
const { FileApiDriverDropbox } = require('lib/file-api-driver-dropbox.js');
class SyncTargetDropbox extends BaseSyncTarget {
static id() {
return 7;
}
@ -32,7 +31,10 @@ class SyncTargetDropbox extends BaseSyncTarget {
async isAuthenticated() {
const f = await this.fileApi();
return !!f.driver().api().authToken();
return !!f
.driver()
.api()
.authToken();
}
async api() {
@ -48,7 +50,7 @@ class SyncTargetDropbox extends BaseSyncTarget {
secret: params.secret,
});
api.on('authRefreshed', (auth) => {
api.on('authRefreshed', auth => {
this.logger().info('Saving updated Dropbox auth.');
Setting.setValue('sync.' + SyncTargetDropbox.id() + '.auth', auth ? auth : null);
});
@ -67,7 +69,6 @@ class SyncTargetDropbox extends BaseSyncTarget {
if (!(await this.isAuthenticated())) throw new Error('User is not authentified');
return new Synchronizer(this.db(), await this.fileApi(), Setting.value('appType'));
}
}
module.exports = SyncTargetDropbox;