refactor: Standardize user and organization ID properties, update Vite proxy port, and refactor data sheet file serving.
This commit is contained in:
@@ -102,6 +102,18 @@ export const notificationService = {
|
||||
}
|
||||
},
|
||||
|
||||
async clearAll(userId: string, organizationId: string) {
|
||||
try {
|
||||
await query(
|
||||
'DELETE FROM notifications WHERE organization_id = $1 AND (user_id = $2 OR user_id IS NULL)',
|
||||
[organizationId, userId]
|
||||
);
|
||||
} catch (error) {
|
||||
console.error('Error clearing all notifications:', error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
async archive(id: string, userId: string) {
|
||||
try {
|
||||
const check = await query('SELECT * FROM notifications WHERE id = $1', [id]);
|
||||
|
||||
Reference in New Issue
Block a user