fix: /api/mails' use address from jwt (#5)

This commit is contained in:
Dream Hunter
2023-08-25 14:42:37 +08:00
committed by GitHub
parent a94fbaff7a
commit d2d5322819
3 changed files with 3 additions and 2 deletions

View File

@@ -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)
}