fix: Add missing maps module and scope gitignore rules
All checks were successful
Test Asgard Runner / test (push) Successful in 3s

maps/ gitignore rule was catching backend-nest/src/modules/maps/.
Scoped to /maps/ (root only) so runtime data is still ignored
but source code isn't.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-02-15 21:35:47 -05:00
parent 50848fd0e8
commit 2ad6a658ca
6 changed files with 172 additions and 3 deletions

View File

@@ -0,0 +1,45 @@
import { Controller, Get, Delete, Put, Body, Param, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger';
import { MapsService } from './maps.service';
import { UpdateRotationDto } from './dto/update-rotation.dto';
import { CurrentTenant } from '../../common/decorators/current-tenant.decorator';
import { RequirePermission } from '../../common/decorators/require-permission.decorator';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
import { PermissionsGuard } from '../../common/guards/permissions.guard';
@ApiTags('maps')
@ApiBearerAuth()
@Controller('maps')
@UseGuards(JwtAuthGuard, PermissionsGuard)
export class MapsController {
constructor(private readonly mapsService: MapsService) {}
@Get()
@RequirePermission('map.view')
@ApiOperation({ summary: 'Get all maps for tenant' })
getMaps(@CurrentTenant() licenseId: string) {
return this.mapsService.getMaps(licenseId);
}
@Delete(':id')
@RequirePermission('map.manage')
@ApiOperation({ summary: 'Delete map from library' })
async deleteMap(@CurrentTenant() licenseId: string, @Param('id') mapId: string) {
await this.mapsService.deleteMap(licenseId, mapId);
return { deleted: true };
}
@Get('rotation')
@RequirePermission('map.view')
@ApiOperation({ summary: 'Get current map rotation' })
getRotation(@CurrentTenant() licenseId: string) {
return this.mapsService.getRotation(licenseId);
}
@Put('rotation')
@RequirePermission('map.manage')
@ApiOperation({ summary: 'Update map rotation order' })
updateRotation(@CurrentTenant() licenseId: string, @Body() dto: UpdateRotationDto) {
return this.mapsService.updateRotation(licenseId, dto);
}
}