This commit is contained in:
May 2024-05-23 00:57:11 -07:00
parent da4c4d202f
commit 82f3c31df2
4 changed files with 4 additions and 7 deletions

View file

@ -1,6 +1,5 @@
import { createTransport } from "nodemailer" import { createTransport } from "nodemailer"
import config from "./config.js" import config from "./config.js"
import { generateFileId } from "./files.js"
const { mail } = config const { mail } = config
const transport = createTransport({ const transport = createTransport({
@ -35,6 +34,4 @@ export function sendMail(to: string, subject: string, content: string) {
`<span style="font-family:monospace;padding:3px 5px 3px 5px;border-radius:8px;background-color:#1C1C1C;color:#DDDDDD;">` `<span style="font-family:monospace;padding:3px 5px 3px 5px;border-radius:8px;background-color:#1C1C1C;color:#DDDDDD;">`
)}<br><br><span style="opacity:0.5">If you do not believe that you are the intended recipient of this email, please disregard this message.</span>`, )}<br><br><span style="opacity:0.5">If you do not believe that you are the intended recipient of this email, please disregard this message.</span>`,
}) })
} }
export * as CodeMgr from "./codes.js"

View file

@ -20,7 +20,6 @@ import {
scheme, scheme,
} from "../../../../lib/middleware.js" } from "../../../../lib/middleware.js"
import ServeError from "../../../../lib/errors.js" import ServeError from "../../../../lib/errors.js"
import { CodeMgr, sendMail } from "../../../../lib/mail.js"
import Configuration from "../../../../lib/config.js" import Configuration from "../../../../lib/config.js"
import { AccountSchemas, AuthSchemas, FileSchemas } from "../../../../lib/schemas/index.js" import { AccountSchemas, AuthSchemas, FileSchemas } from "../../../../lib/schemas/index.js"

View file

@ -22,7 +22,8 @@ import {
verifyPoi, verifyPoi,
} from "../../../../lib/middleware.js" } from "../../../../lib/middleware.js"
import ServeError from "../../../../lib/errors.js" import ServeError from "../../../../lib/errors.js"
import { CodeMgr, sendMail } from "../../../../lib/mail.js" import { sendMail } from "../../../../lib/mail.js"
import * as CodeMgr from "../../../../lib/codes.js"
import Configuration from "../../../../lib/config.js" import Configuration from "../../../../lib/config.js"
import { AccountSchemas, FileSchemas } from "../../../../lib/schemas/index.js" import { AccountSchemas, FileSchemas } from "../../../../lib/schemas/index.js"

View file

@ -3,7 +3,7 @@ import bytes from "bytes"
import ServeError from "../../../lib/errors.js" import ServeError from "../../../lib/errors.js"
import * as Accounts from "../../../lib/accounts.js" import * as Accounts from "../../../lib/accounts.js"
import type Files from "../../../lib/files.js" import type Files from "../../../lib/files.js"
import { CodeMgr } from "../../../lib/mail.js" import * as CodeMgr from "../../../lib/codes.js"
import { Hono } from "hono" import { Hono } from "hono"
import { getAccount, login } from "../../../lib/middleware.js" import { getAccount, login } from "../../../lib/middleware.js"
export let router = new Hono<{ export let router = new Hono<{