ドライブ容量の設定をDBに保存するようにしたりリファクタリングしたり
This commit is contained in:
parent
06bb2a1c7c
commit
8f714b5b12
18 changed files with 133 additions and 54 deletions
|
@ -28,6 +28,28 @@ if ((config as any).description) {
|
|||
}
|
||||
});
|
||||
}
|
||||
if ((config as any).localDriveCapacityMb) {
|
||||
Meta.findOne({}).then(m => {
|
||||
if (m != null && m.localDriveCapacityMb == null) {
|
||||
Meta.update({}, {
|
||||
$set: {
|
||||
localDriveCapacityMb: (config as any).localDriveCapacityMb
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if ((config as any).remoteDriveCapacityMb) {
|
||||
Meta.findOne({}).then(m => {
|
||||
if (m != null && m.remoteDriveCapacityMb == null) {
|
||||
Meta.update({}, {
|
||||
$set: {
|
||||
remoteDriveCapacityMb: (config as any).remoteDriveCapacityMb
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export type IMeta = {
|
||||
name?: string;
|
||||
|
@ -44,6 +66,16 @@ export type IMeta = {
|
|||
hidedTags?: string[];
|
||||
bannerUrl?: string;
|
||||
|
||||
/**
|
||||
* Drive capacity of a local user (MB)
|
||||
*/
|
||||
localDriveCapacityMb?: number;
|
||||
|
||||
/**
|
||||
* Drive capacity of a remote user (MB)
|
||||
*/
|
||||
remoteDriveCapacityMb?: number;
|
||||
|
||||
/**
|
||||
* Max allowed note text length in charactors
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue