protect email configuration endpoint

This commit is contained in:
2026-09-06 17:50:18 +03:00
parent b5020f4217
commit 4edbdc94e5
+2
View File
@@ -1486,6 +1486,8 @@ const server = http.createServer(async (req, res) => {
// --- E-posta bildirimi (Resend) --- // --- E-posta bildirimi (Resend) ---
if (url.pathname === '/api/notify/email/config') { if (url.pathname === '/api/notify/email/config') {
const user = userFromAuthHeader(req.headers['authorization']);
if (!user) return json(res, 401, { success: false, error: 'oturum gerekli' });
// 'from' gizli bilgi değil; hangi adresin kullanıldığını görünür kılar // 'from' gizli bilgi değil; hangi adresin kullanıldığını görünür kılar
return json(res, 200, { return json(res, 200, {
success: true, success: true,