fix: type templateSaved for Hono's HTML response

The skipped-mail branch returns showEvent, which can be a Promise from c.html().
This commit is contained in:
blake committed 2026-10-29 18:12:15 -05:00
1 parent 1b78a06f72
commit e1bd85f879
1 file changed
+1 -1
+1 -1
View File
@@ -895,7 +895,7 @@ function templateSaved(
services: AdminServices, services: AdminServices,
eventId: number, eventId: number,
saved: { mailed: number; skipped?: string[] }, saved: { mailed: number; skipped?: string[] },
): Response { ): Response | Promise<Response> {
const notice = saved.mailed > 0 ? 'template-saved-mailed' : 'template-saved'; const notice = saved.mailed > 0 ? 'template-saved-mailed' : 'template-saved';
if (saved.skipped && saved.skipped.length > 0) { if (saved.skipped && saved.skipped.length > 0) {
return showEvent(c, services, undefined, 200, undefined, eventId, saved.skipped.join(' '), notice); return showEvent(c, services, undefined, 200, undefined, eventId, saved.skipped.join(' '), notice);