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';
 | 
			
		||||
  }
 | 
			
		||||
  if (direction === 'up') {
 | 
			
		||||
    const details = Object.assign({}, window.currentDictionary);
 | 
			
		||||
    delete details.words;
 | 
			
		||||
    return uploadDetails(details);
 | 
			
		||||
    return uploadDetails();
 | 
			
		||||
  } else if (direction === 'down') {
 | 
			
		||||
    window.currentDictionary = Object.assign(window.currentDictionary, remoteDetails);
 | 
			
		||||
    saveDictionary();
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +125,9 @@ export function syncDetails(remoteDetails = false) {
 | 
			
		|||
  return Promise.resolve(true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function uploadDetails(details) {
 | 
			
		||||
export function uploadDetails() {
 | 
			
		||||
  const details = Object.assign({}, window.currentDictionary);
 | 
			
		||||
  delete details.words;
 | 
			
		||||
  return request({
 | 
			
		||||
    action: 'set-dictionary-details',
 | 
			
		||||
    details,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue