add some stuff

This commit is contained in:
May 2024-04-30 18:46:37 -07:00
parent 364c3627a4
commit e4a4e24d6c
2 changed files with 7 additions and 1 deletions

View file

@ -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),

View file

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