mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
add some stuff
This commit is contained in:
parent
364c3627a4
commit
e4a4e24d6c
|
@ -15,6 +15,7 @@ export interface Configuration {
|
||||||
requiredForUpload: boolean
|
requiredForUpload: boolean
|
||||||
}
|
}
|
||||||
mail: {
|
mail: {
|
||||||
|
enabled: boolean
|
||||||
transport: {
|
transport: {
|
||||||
host: string
|
host: string
|
||||||
port: number
|
port: number
|
||||||
|
@ -31,6 +32,8 @@ export interface Configuration {
|
||||||
export interface ClientConfiguration {
|
export interface ClientConfiguration {
|
||||||
version: string
|
version: string
|
||||||
files: number
|
files: number
|
||||||
|
totalSize: number
|
||||||
|
mailEnabled: boolean
|
||||||
maxDiscordFiles: number
|
maxDiscordFiles: number
|
||||||
maxDiscordFileSize: number
|
maxDiscordFileSize: number
|
||||||
accounts: {
|
accounts: {
|
||||||
|
@ -56,6 +59,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mail: {
|
mail: {
|
||||||
|
enabled: ["HOST","PORT","SEND_FROM","USER","PASS"].every(e => Boolean(process.env[`MAIL__${e}`])),
|
||||||
|
|
||||||
transport: {
|
transport: {
|
||||||
host: process.env.MAIL__HOST,
|
host: process.env.MAIL__HOST,
|
||||||
port: Number(process.env.MAIL__PORT),
|
port: Number(process.env.MAIL__PORT),
|
||||||
|
|
|
@ -21,7 +21,8 @@ export default function(files: Files) {
|
||||||
totalSize: Object.values(files.files).filter(e => e.sizeInBytes).reduce((acc,cur)=>acc+cur.sizeInBytes!,0),
|
totalSize: Object.values(files.files).filter(e => e.sizeInBytes).reduce((acc,cur)=>acc+cur.sizeInBytes!,0),
|
||||||
maxDiscordFiles: config.maxDiscordFiles,
|
maxDiscordFiles: config.maxDiscordFiles,
|
||||||
maxDiscordFileSize: config.maxDiscordFileSize,
|
maxDiscordFileSize: config.maxDiscordFileSize,
|
||||||
accounts: config.accounts
|
accounts: config.accounts,
|
||||||
|
mailEnabled: config.mail.enabled
|
||||||
} as ClientConfiguration)
|
} as ClientConfiguration)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue