mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
feat: support ssh key/pem file in DB syncer (#2727)
* feat: support connect database with ssh tunnel in syncer * feat: improve i18n translate * feat: improve code format and i18n
This commit is contained in:
@ -58,6 +58,18 @@ export function addSyncer(syncer) {
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function testSyncerDb(syncer) {
|
||||
const newSyncer = Setting.deepCopy(syncer);
|
||||
return fetch(`${Setting.ServerUrl}/api/test-syncer-db`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: JSON.stringify(newSyncer),
|
||||
headers: {
|
||||
"Accept-Language": Setting.getAcceptLanguage(),
|
||||
},
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function deleteSyncer(syncer) {
|
||||
const newSyncer = Setting.deepCopy(syncer);
|
||||
return fetch(`${Setting.ServerUrl}/api/delete-syncer`, {
|
||||
|
Reference in New Issue
Block a user