mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-26 18:58:21 +02:00
All: Fixed Nextcloud sync target ID (which was incorrectly set to WebDAV sync ID)
This commit is contained in:
parent
3551c26e28
commit
9347683fe3
@ -37,7 +37,7 @@ class SyncTargetNextcloud extends BaseSyncTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async initFileApi() {
|
async initFileApi() {
|
||||||
const fileApi = await SyncTargetWebDAV.initFileApi_({
|
const fileApi = await SyncTargetWebDAV.initFileApi_(SyncTargetNextcloud.id(), {
|
||||||
path: Setting.value('sync.5.path'),
|
path: Setting.value('sync.5.path'),
|
||||||
username: Setting.value('sync.5.username'),
|
username: Setting.value('sync.5.username'),
|
||||||
password: Setting.value('sync.5.password'),
|
password: Setting.value('sync.5.password'),
|
||||||
|
@ -28,7 +28,7 @@ class SyncTargetWebDAV extends BaseSyncTarget {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async initFileApi_(options) {
|
static async initFileApi_(syncTargetId, options) {
|
||||||
const apiOptions = {
|
const apiOptions = {
|
||||||
baseUrl: () => options.path,
|
baseUrl: () => options.path,
|
||||||
username: () => options.username,
|
username: () => options.username,
|
||||||
@ -38,12 +38,12 @@ class SyncTargetWebDAV extends BaseSyncTarget {
|
|||||||
const api = new WebDavApi(apiOptions);
|
const api = new WebDavApi(apiOptions);
|
||||||
const driver = new FileApiDriverWebDav(api);
|
const driver = new FileApiDriverWebDav(api);
|
||||||
const fileApi = new FileApi('', driver);
|
const fileApi = new FileApi('', driver);
|
||||||
fileApi.setSyncTargetId(this.id());
|
fileApi.setSyncTargetId(syncTargetId);
|
||||||
return fileApi;
|
return fileApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async checkConfig(options) {
|
static async checkConfig(options) {
|
||||||
const fileApi = await SyncTargetWebDAV.initFileApi_(options);
|
const fileApi = await SyncTargetWebDAV.initFileApi_(SyncTargetWebDAV.id(), options);
|
||||||
|
|
||||||
const output = {
|
const output = {
|
||||||
ok: false,
|
ok: false,
|
||||||
@ -63,7 +63,7 @@ class SyncTargetWebDAV extends BaseSyncTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async initFileApi() {
|
async initFileApi() {
|
||||||
const fileApi = await SyncTargetWebDAV.initFileApi_({
|
const fileApi = await SyncTargetWebDAV.initFileApi_(SyncTargetWebDAV.id(), {
|
||||||
path: Setting.value('sync.6.path'),
|
path: Setting.value('sync.6.path'),
|
||||||
username: Setting.value('sync.6.username'),
|
username: Setting.value('sync.6.username'),
|
||||||
password: Setting.value('sync.6.password'),
|
password: Setting.value('sync.6.password'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user