diff --git a/web/src/client/services/push-notification-service.ts b/web/src/client/services/push-notification-service.ts index 9838d289..8742e6c1 100644 --- a/web/src/client/services/push-notification-service.ts +++ b/web/src/client/services/push-notification-service.ts @@ -1,9 +1,9 @@ -import { PushNotificationPreferences, PushSubscription } from '../../shared/types.js'; -import { createLogger } from '../utils/logger.js'; -import { authClient } from './auth-client.js'; +import type { PushNotificationPreferences, PushSubscription } from '../../shared/types'; +import { createLogger } from '../utils/logger'; +import { authClient } from './auth-client'; // Re-export types for components -export { PushSubscription, PushNotificationPreferences }; +export type { PushSubscription, PushNotificationPreferences }; export type NotificationPreferences = PushNotificationPreferences; const logger = createLogger('push-notification-service'); @@ -71,7 +71,7 @@ export class PushNotificationService { scope: '/', }); - logger.log('service worker registered'); + logger.log('service worker registered successfully'); // Wait for service worker to be ready await navigator.serviceWorker.ready; diff --git a/web/src/server/middleware/auth.ts b/web/src/server/middleware/auth.ts index 7d87efd3..de984be1 100644 --- a/web/src/server/middleware/auth.ts +++ b/web/src/server/middleware/auth.ts @@ -58,9 +58,10 @@ export function createAuthMiddleware(config: AuthConfig) { return next(); } - // If no auth is disabled, allow all requests + // If no auth is required, allow all requests if (config.noAuth) { req.authMethod = 'no-auth'; + req.userId = 'no-auth-user'; // Set a default user ID for no-auth mode return next(); }