🧹 chore(calendar): cleanup debug logs and stale comments

- Replace console.error with NestJS Logger in NetworkService
- Remove debug console.log statements from mana page and events store
- Remove stale TODO comment in ShareController (user.email already available)
- Update TODO comments to "Workaround" notes in EventContextMenu
- Fix port fallback in main.ts (3016 → 3014) for consistency
This commit is contained in:
Till-JS 2026-01-28 12:31:43 +01:00
parent 78ff102631
commit 2e7378710f
6 changed files with 7 additions and 10 deletions

View file

@ -73,7 +73,7 @@ async function bootstrap() {
exclude: ['metrics', 'health'],
});
const port = process.env.PORT || 3016;
const port = process.env.PORT || 3014;
await app.listen(port);
console.log(`Calendar backend running on http://localhost:${port}`);
}

View file

@ -1,4 +1,4 @@
import { Injectable, Inject } from '@nestjs/common';
import { Injectable, Inject, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { eq } from 'drizzle-orm';
import { DATABASE_CONNECTION } from '../db/database.module';
@ -36,6 +36,7 @@ export interface NetworkGraphResponse {
@Injectable()
export class NetworkService {
private readonly logger = new Logger(NetworkService.name);
private authUrl: string;
constructor(
@ -59,14 +60,14 @@ export class NetworkService {
});
if (!response.ok) {
console.error('Failed to fetch tags from central API:', response.status);
this.logger.warn(`Failed to fetch tags from central API: ${response.status}`);
return new Map();
}
const tags: Tag[] = await response.json();
return new Map(tags.map((t) => [t.id, t]));
} catch (error) {
console.error('Error fetching tags from central API:', error);
this.logger.error('Error fetching tags from central API', error);
return new Map();
}
}

View file

@ -48,7 +48,6 @@ export class ShareController {
@Get('shares/invitations')
async getInvitations(@CurrentUser() user: CurrentUserData) {
// TODO: Get user email from auth service
const invitations = await this.shareService.findPendingInvitations(
user.userId,
user.email || ''

View file

@ -102,7 +102,7 @@
}
function handleChangeCalendar() {
// TODO: Implement calendar picker modal
// Workaround: cycles through calendars until modal is implemented
const event = eventContextMenuStore.targetEvent;
if (!event) return;
@ -119,7 +119,7 @@
}
function handleChangeColor() {
// TODO: Implement color picker modal
// Workaround: cycles through colors until modal is implemented
const event = eventContextMenuStore.targetEvent;
if (!event) return;

View file

@ -74,7 +74,6 @@ export const eventsStore = {
} else {
// API returns events array directly (already extracted in api/events.ts)
const eventsData = result.data as CalendarEvent[] | null;
console.log('[Events Store] Loaded events:', eventsData?.length, eventsData);
events = eventsData || [];
loadedRange = { start: startDate, end: endDate };
}

View file

@ -3,12 +3,10 @@
import { toast } from '$lib/stores/toast.svelte';
function handleSubscribe(planId: string) {
console.log('Subscribe to plan:', planId);
toast.info(`Abo "${planId}" ausgewählt. Bezahlsystem wird noch integriert.`);
}
function handleBuyPackage(packageId: string) {
console.log('Buy package:', packageId);
toast.info(`Paket "${packageId}" ausgewählt. Bezahlsystem wird noch integriert.`);
}
</script>