ドライブ容量の設定をDBに保存するようにしたりリファクタリングしたり
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user