mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-09 09:29:54 +08:00
fix: /api/mails' use address from jwt (#5)
This commit is contained in:
@@ -4,7 +4,7 @@ import { Jwt } from 'hono/utils/jwt'
|
||||
const api = new Hono()
|
||||
|
||||
api.get('/api/mails', async (c) => {
|
||||
const { address } = c.req.query()
|
||||
const { address } = c.get("jwtPayload")
|
||||
if (!address) {
|
||||
return c.json({ "error": "No address" }, 400)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user