mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-06-19 07:36:39 +02:00
Make uploadDetails not need a parameter
This commit is contained in:
parent
af609afaca
commit
6a6b545979
1 changed files with 4 additions and 4 deletions
|
@ -116,9 +116,7 @@ export function syncDetails(remoteDetails = false) {
|
||||||
direction = 'down';
|
direction = 'down';
|
||||||
}
|
}
|
||||||
if (direction === 'up') {
|
if (direction === 'up') {
|
||||||
const details = Object.assign({}, window.currentDictionary);
|
return uploadDetails();
|
||||||
delete details.words;
|
|
||||||
return uploadDetails(details);
|
|
||||||
} else if (direction === 'down') {
|
} else if (direction === 'down') {
|
||||||
window.currentDictionary = Object.assign(window.currentDictionary, remoteDetails);
|
window.currentDictionary = Object.assign(window.currentDictionary, remoteDetails);
|
||||||
saveDictionary();
|
saveDictionary();
|
||||||
|
@ -127,7 +125,9 @@ export function syncDetails(remoteDetails = false) {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function uploadDetails(details) {
|
export function uploadDetails() {
|
||||||
|
const details = Object.assign({}, window.currentDictionary);
|
||||||
|
delete details.words;
|
||||||
return request({
|
return request({
|
||||||
action: 'set-dictionary-details',
|
action: 'set-dictionary-details',
|
||||||
details,
|
details,
|
||||||
|
|
Loading…
Add table
Reference in a new issue