1.0.18
This commit is contained in:
1 parent
d83ca684d7
commit
8ee4fe4d68
49 files changed
+2126
-261
No files matched your search
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user