refactor: Standardize user and organization ID properties, update Vite proxy port, and refactor data sheet file serving.

This commit is contained in:
2026-03-19 22:05:47 +00:00
parent 0b81094050
commit 37cc1b2acb
10 changed files with 50 additions and 43 deletions

View File

@@ -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]);