This commit is contained in:
jarek committed 2026-02-16 08:46:56 +01:00
1 parent d83ca684d7
commit 8ee4fe4d68
49 files changed
+2126 -261

No files matched your search

+9 -1
View File
@@ -78,7 +78,15 @@ export const POST: RequestHandler = async (event) => {
// Audit log
await auditNotification(event, 'create', setting.id, setting.name);
return json(setting);
// Don't expose passwords in response
const safeSetting = setting.type === 'smtp' ? {
...setting,
config: {
...setting.config,
password: setting.config.password ? '********' : undefined
}
} : setting;
return json(safeSetting);
} catch (error: any) {
console.error('Error creating notification setting:', error);
return json({ error: error.message || 'Failed to create notification setting' }, { status: 500 });