Feature/71 add leaflet to view tracks drawer (#72)

* adding leaflet

* adding tracks swiper

* adding tracks swiper

* adding tracks swiper

* adding tracks swiper

* adding tracks swiper

* adding tracks swiper
This commit was merged in pull request #72.
This commit is contained in:
2025-03-22 23:42:08 -05:00
committed by GitHub
parent 08498a64d8
commit 0f1e303c27
8 changed files with 857 additions and 785 deletions

View File

@@ -8,6 +8,7 @@ import {
Post,
Put,
Query,
StreamableFile,
UploadedFile,
UseGuards,
UseInterceptors
@@ -22,14 +23,15 @@ import { FileService } from '../file/file.service';
import { FileInterceptor } from '@nestjs/platform-express';
@Controller('logs')
@UseInterceptors(new LogInterceptor())
export class LogController {
constructor(
private readonly fileService: FileService,
private readonly logService: LogService
) {}
@Get(':partitionKey/:rowKey')
@UseInterceptors(new LogInterceptor())
async find(
@Param('partitionKey') partitionKey: string,
@Param('rowKey') rowKey: string
@@ -44,6 +46,7 @@ export class LogController {
}
@Get()
@UseInterceptors(new LogInterceptor())
async findAll(): Promise<Log[]> {
try {
return await this.logService.findAll();
@@ -121,11 +124,18 @@ export class LogController {
}
}
@Get(':partitionKey/:rowKey/track')
async downloadTrack(@Param('rowKey') rowKey: string, @Query('fileName') fileName: string): Promise<string> {
const containerName = 'tracks';
const downloadedFile: string = await this.fileService.downloadFile(containerName, rowKey, fileName)
return downloadedFile;
}
@UseGuards(AuthGuard)
@Delete(':partitionKey/:rowKey/track')
async deleteTrack(@Param('rowKey') rowKey: string, @Query('fileName') fileName: string): Promise<void> {
try {
console.log(fileName)
const containerName = 'tracks';
return await this.fileService.deleteFile(containerName, rowKey, fileName)