feat: integrate analytics and fragment receipt improvements
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Query } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { CurrentSessionUserId } from '../auth/current-session-user.decorator';
|
||||
import {
|
||||
CreateCommonReportFieldDto,
|
||||
CreateBlacklistDto,
|
||||
CreateDrainageFieldDto,
|
||||
UpsertDrainageDetectionRuleDto,
|
||||
TestDrainageDetectionDto,
|
||||
CreatePhoneCarrierRuleDto,
|
||||
CreatePhoneSegmentDto,
|
||||
CreateSensitiveWordDto,
|
||||
@@ -125,6 +128,31 @@ export class DictionariesController {
|
||||
return this.dictionaries.deleteDrainageField(id);
|
||||
}
|
||||
|
||||
@Get('drainage-detection-rules')
|
||||
listDrainageDetectionRules(@Query('keyword') keyword?: string, @Query('status') status?: string) {
|
||||
return this.dictionaries.listDrainageDetectionRules({ keyword, status });
|
||||
}
|
||||
|
||||
@Post('drainage-detection-rules/test')
|
||||
testDrainageDetection(@Body() body: TestDrainageDetectionDto) {
|
||||
return this.dictionaries.testDrainageDetection(body);
|
||||
}
|
||||
|
||||
@Post('drainage-detection-rules')
|
||||
createDrainageDetectionRule(@Body() body: UpsertDrainageDetectionRuleDto, @CurrentSessionUserId() operatorId?: string) {
|
||||
return this.dictionaries.createDrainageDetectionRule({ ...body, operatorId });
|
||||
}
|
||||
|
||||
@Put('drainage-detection-rules/:id')
|
||||
updateDrainageDetectionRule(@Param('id') id: string, @Body() body: UpsertDrainageDetectionRuleDto, @CurrentSessionUserId() operatorId?: string) {
|
||||
return this.dictionaries.updateDrainageDetectionRule(id, { ...body, operatorId });
|
||||
}
|
||||
|
||||
@Post('drainage-detection-rules/:id/status')
|
||||
changeDrainageDetectionRuleStatus(@Param('id') id: string, @Body() body: DictionaryStatusDto, @CurrentSessionUserId() operatorId?: string) {
|
||||
return this.dictionaries.changeDrainageDetectionRuleStatus(id, { ...body, operatorId });
|
||||
}
|
||||
|
||||
@Get('common-report-fields')
|
||||
listCommonReportFields() {
|
||||
return this.dictionaries.listCommonReportFields();
|
||||
|
||||
Reference in New Issue
Block a user