You've already forked joplin
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user