When a user submits a credit request, an email is sent to all configured NOTIFY_TO recipients with approve buttons (5M, 10M, 20M), a custom amount option, and a reject button. Each button is a signed HMAC-SHA256 webhook URL that expires after WEBHOOK_TTL_HOURS. Clicking approve from email processes the top-up identical to the admin dashboard — balance update, history log, request status change. Double-approval protection prevents the same link from being used twice. Portal approval still works alongside email approval. New dependencies: nodemailer New files: services/email.js, routes/webhooks.js Modified: server.js, routes/requests.js, .env.example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
329 B
JSON
15 lines
329 B
JSON
{
|
|
"name": "librechat-balance-manager",
|
|
"version": "1.0.0",
|
|
"description": "Balance management dashboard for LibreChat",
|
|
"main": "server.js",
|
|
"scripts": {
|
|
"start": "node server.js"
|
|
},
|
|
"dependencies": {
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.21.0",
|
|
"mongodb": "^6.12.0",
|
|
"nodemailer": "^8.0.4"
|
|
}
|
|
}
|