Fix reveal-secret: use user_id from JWT payload (not id)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ec0eef7de0
commit
5673f3e80a
1 changed files with 1 additions and 1 deletions
|
|
@ -414,7 +414,7 @@ export async function adminRoutes(app) {
|
|||
const { password } = request.body || {}
|
||||
if (!password) return reply.status(400).send({ error: 'Password required' })
|
||||
|
||||
const adminId = request.adminPayload.id
|
||||
const adminId = request.adminPayload.user_id
|
||||
const { rows: [user] } = await pool.query(
|
||||
'SELECT password_hash FROM users WHERE id = $1 AND active = true AND is_admin = true',
|
||||
[adminId]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue