新增邮件发送和管理员功能
This commit is contained in:
@@ -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 })
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user