新增邮件发送和管理员功能

This commit is contained in:
eoao
2025-05-29 17:38:50 +08:00
parent de742d31e7
commit 2341d14b2d
364 changed files with 24202 additions and 1079 deletions

View File

@@ -1,10 +1,11 @@
import app from './hono/webs';
import { email } from './email/email';
import userService from './service/user-service';
export default {
fetch(req, env, ctx) {
async fetch(req, env, ctx) {
const url = new URL(req.url)
console.log(url.pathname)
if (url.pathname.startsWith('/api/')) {
url.pathname = url.pathname.replace('/api', '')
req = new Request(url.toString(), req)
@@ -13,5 +14,8 @@ export default {
return env.assets.fetch(req);
},
email: email
email: email,
async scheduled(c, env, ctx) {
await userService.resetDaySendCount({ env })
},
};