refactor: update import paths for database modules and remove legacy db.js and schema.js files

This commit is contained in:
Haileyesus
2026-04-24 15:11:25 +03:00
parent 15171e1428
commit 4bd07c3ece
18 changed files with 102 additions and 750 deletions

View File

@@ -1,5 +1,5 @@
import webPush from 'web-push';
import { notificationPreferencesDb, pushSubscriptionsDb, sessionsDb } from '../database/db.js';
import { notificationPreferencesDb, pushSubscriptionsDb, sessionsDb } from '../modules/database/index.js';
const KIND_TO_PREF_KEY = {
action_required: 'actionRequired',

View File

@@ -1,7 +1,8 @@
import webPush from 'web-push';
import { db } from '../database/db.js';
import { getConnection } from '../modules/database/connection.js';
let cachedKeys = null;
const db = getConnection();
function ensureVapidKeys() {
if (cachedKeys) return cachedKeys;