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

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,11 +1,20 @@
import attService from './att-service';
import constant from '../const/constant';
const r2Service = {
async putObj(c, key, content, metadata) {
const body = typeof content === 'string'
? new TextEncoder().encode(content)
: content;
await c.env.r2.put(key, body, {
await c.env.r2.put(key, content, {
httpMetadata: {...metadata}
});
},
async getObj(c, key) {
return await c.env.r2.get(key);
},
async delete(c, key) {
await c.env.r2.delete(key);
}
};
export default r2Service;