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

Minor refactoring to make function purpose clearer

This commit is contained in:
Laurent Cozic
2018-02-21 18:36:29 +00:00
parent 4a56c76901
commit b9db747b5c
3 changed files with 14 additions and 5 deletions

View File

@ -28,7 +28,7 @@ class SyncTargetWebDAV extends BaseSyncTarget {
return true;
}
static async initFileApi_(syncTargetId, options) {
static async newFileApi_(syncTargetId, options) {
const apiOptions = {
baseUrl: () => options.path,
username: () => options.username,
@ -43,7 +43,8 @@ class SyncTargetWebDAV extends BaseSyncTarget {
}
static async checkConfig(options) {
const fileApi = await SyncTargetWebDAV.initFileApi_(SyncTargetWebDAV.id(), options);
const fileApi = await SyncTargetWebDAV.newFileApi_(SyncTargetWebDAV.id(), options);
fileApi.requestRepeatCount_ = 0;
const output = {
ok: false,
@ -63,7 +64,7 @@ class SyncTargetWebDAV extends BaseSyncTarget {
}
async initFileApi() {
const fileApi = await SyncTargetWebDAV.initFileApi_(SyncTargetWebDAV.id(), {
const fileApi = await SyncTargetWebDAV.newFileApi_(SyncTargetWebDAV.id(), {
path: Setting.value('sync.6.path'),
username: Setting.value('sync.6.username'),
password: Setting.value('sync.6.password'),