リモートのファイルをキャッシュするかどうかの設定をDBに保存するように
This commit is contained in:
		
							parent
							
								
									42e007ddb7
								
							
						
					
					
						commit
						2a5c19cd01
					
				
					 9 changed files with 36 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -82,6 +82,13 @@ export const meta = {
 | 
			
		|||
				'en-US': 'Drive capacity of a remote user (MB)'
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		cacheRemoteFiles: {
 | 
			
		||||
			validator: $.bool.optional,
 | 
			
		||||
			desc: {
 | 
			
		||||
				'ja-JP': 'リモートのファイルをキャッシュするか否か'
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -128,6 +135,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
 | 
			
		|||
		set.remoteDriveCapacityMb = ps.remoteDriveCapacityMb;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (ps.cacheRemoteFiles !== undefined) {
 | 
			
		||||
		set.cacheRemoteFiles = ps.cacheRemoteFiles;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	await Meta.update({}, {
 | 
			
		||||
		$set: set
 | 
			
		||||
	}, { upsert: true });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,6 +59,7 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
 | 
			
		|||
		disableLocalTimeline: instance.disableLocalTimeline,
 | 
			
		||||
		driveCapacityPerLocalUserMb: instance.localDriveCapacityMb,
 | 
			
		||||
		driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb,
 | 
			
		||||
		cacheRemoteFiles: instance.cacheRemoteFiles,
 | 
			
		||||
		recaptchaSitekey: config.recaptcha ? config.recaptcha.site_key : null,
 | 
			
		||||
		swPublickey: config.sw ? config.sw.public_key : null,
 | 
			
		||||
		hidedTags: (me && me.isAdmin) ? instance.hidedTags : undefined,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue