FreeLLMAPI / server /dist /routes /settings.js
Nryn215's picture
Upload folder using huggingface_hub
077865a verified
Raw
History Blame Contribute Delete
483 Bytes
import { Router } from 'express';
import { getUnifiedApiKey, regenerateUnifiedKey } from '../db/index.js';
export const settingsRouter = Router();
// Get the unified API key
settingsRouter.get('/api-key', (_req, res) => {
res.json({ apiKey: getUnifiedApiKey() });
});
// Regenerate the unified API key
settingsRouter.post('/api-key/regenerate', (_req, res) => {
const newKey = regenerateUnifiedKey();
res.json({ apiKey: newKey });
});
//# sourceMappingURL=settings.js.map