fix: respect brief opt-out and report channel delivery failures
This commit is contained in:
+2
-2
@@ -1537,8 +1537,8 @@ const server = http.createServer(async (req, res) => {
|
||||
if (url.pathname === '/api/admin/brief/gonder' && req.method === 'POST') {
|
||||
const user = userFromAuthHeader(req.headers['authorization']);
|
||||
if (!user?.isAdmin) return json(res, 403, { success: false, error: 'yetki yok' });
|
||||
const r = await haftalikBriefGonder(async () => (await tendersPayload()).tenders, { zorla: url.searchParams.get('zorla') === '1' });
|
||||
return json(res, 200, { success: true, ...r });
|
||||
const r = await haftalikBriefGonder(async () => (await tendersPayload()).tenders);
|
||||
return json(res, 200, { success: r.hata === 0, partial: r.hata > 0 && r.gonderilen > 0, ...r });
|
||||
}
|
||||
if ((url.pathname === '/api/ai/belge-sor' || url.pathname === '/api/ai/teklif-denetim' || url.pathname === '/api/ai/teklif-taslak') && req.method === 'POST') {
|
||||
const user = userFromAuthHeader(req.headers['authorization']);
|
||||
|
||||
Reference in New Issue
Block a user