feat: yönetici için 'şimdi gönder' (POST /api/notify/run?zorla=1)
Bildirim turunu temel-alma adımını atlayarak çalıştırır; abonelik kriterine uyan ihaleler hemen e-posta olarak gönderilir. Test ve talep üzerine özet için.
This commit is contained in:
+1
-1
@@ -617,7 +617,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const user = userFromAuthHeader(req.headers['authorization']);
|
||||
if (!user?.isAdmin) return json(res, 403, { success: false, error: 'yönetici yetkisi gerekli' });
|
||||
try {
|
||||
const sonuc = await bildirimleriIsle(() => tendersPayload());
|
||||
const sonuc = await bildirimleriIsle(() => tendersPayload(), { zorla: url.searchParams.get('zorla') === '1' });
|
||||
return json(res, 200, { success: true, ...sonuc });
|
||||
} catch (e) {
|
||||
return json(res, 502, { success: false, error: e.message });
|
||||
|
||||
Reference in New Issue
Block a user