feat: Complete NestJS backend scaffold — 22 modules, 39 entities, WebSocket gateway
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
Full backend rewrite from Rust/Axum to NestJS/TypeScript. - 22 feature modules (auth, servers, wipes, maps, plugins, players, console, chat, team, notifications, settings, schedules, analytics, alerts, status, store, webstore, admin, setup, migration, users, licenses) - 39 TypeORM entities matching PostgreSQL schema (12 migrations) - Common infrastructure: JWT/RBAC guards, decorators, exception filter - NATS service with pub/sub/request-reply - Socket.IO WebSocket gateway with NATS bridge - Docker: NestJS Dockerfile + updated docker-compose.yml - Zero compile errors (npx tsc --noEmit clean) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { Controller, Get, Put, Body, UseGuards } from '@nestjs/common';
|
||||
import {
|
||||
ApiTags,
|
||||
ApiBearerAuth,
|
||||
ApiOperation,
|
||||
ApiResponse,
|
||||
} from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
|
||||
import { CurrentTenant } from '../../common/decorators/current-tenant.decorator';
|
||||
import { NotificationsService } from './notifications.service';
|
||||
import { UpdateConfigDto } from './dto/update-config.dto';
|
||||
|
||||
@ApiTags('notifications')
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Controller('notifications')
|
||||
export class NotificationsController {
|
||||
constructor(private readonly notificationsService: NotificationsService) {}
|
||||
|
||||
@Get('config')
|
||||
@ApiOperation({
|
||||
summary: 'Get notification configuration',
|
||||
description: 'Returns notification settings for this license',
|
||||
})
|
||||
@ApiResponse({
|
||||
status: 200,
|
||||
description: 'Notification config retrieved successfully',
|
||||
})
|
||||
async getConfig(@CurrentTenant() licenseId: string) {
|
||||
return await this.notificationsService.getConfig(licenseId);
|
||||
}
|
||||
|
||||
@Put('config')
|
||||
@ApiOperation({
|
||||
summary: 'Update notification configuration',
|
||||
description: 'Update notification settings for this license',
|
||||
})
|
||||
@ApiResponse({
|
||||
status: 200,
|
||||
description: 'Notification config updated successfully',
|
||||
})
|
||||
async updateConfig(
|
||||
@CurrentTenant() licenseId: string,
|
||||
@Body() dto: UpdateConfigDto,
|
||||
) {
|
||||
return await this.notificationsService.updateConfig(licenseId, dto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user