リモートのファイルをキャッシュするかどうかの設定をDBに保存するように

This commit is contained in:
syuilo 2018-11-06 07:52:13 +09:00
parent 42e007ddb7
commit 2a5c19cd01
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
9 changed files with 36 additions and 12 deletions

View file

@ -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 });