46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { Controller, Get, Post, Patch, Delete, Param, Body, Query } from '@nestjs/common';
|
|
import { VisualisierungenService } from './visualisierungen.service';
|
|
import { ProConVisualisierungenAggEntity } from 'src/_sql/procon.Visualisierung.entity';
|
|
|
|
@Controller('procon/visu')
|
|
export class VisualisierungenController {
|
|
constructor(private readonly service: VisualisierungenService) { }
|
|
|
|
// @Get()
|
|
// getAll() {
|
|
// return this.service.getVisualisierungen();
|
|
// }
|
|
|
|
@Get('agg/:aggId')
|
|
getVisuAggData(@Param('aggId') id: number) {
|
|
return this.service.getVisuaOfAgg(id);
|
|
}
|
|
|
|
|
|
@Patch(':id')
|
|
async update(@Param('id') id: number, @Body() dto: Partial<ProConVisualisierungenAggEntity>) {
|
|
let result = await this.service.update(id, dto);
|
|
let r2 = await fetch('http://wsrksl01:3001/click', { method: 'POST',});
|
|
return result;
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get('aggregate/:id')
|
|
getAggregat(@Param('id') id: number) {
|
|
//return this.service.getAggregat(id);
|
|
}
|
|
|
|
@Get('aggregate')
|
|
getAggregate() {
|
|
//return this.service.getAggregate();
|
|
}
|
|
|
|
@Get('saveAgg/:aggId')
|
|
getVisuAggSave(@Param('aggId') id: number) {
|
|
return this.service.updateMongoDB(id);
|
|
}
|
|
|
|
}
|