feat(sms,admin): implement full sms logging, tracking, filtering, and analytics system
This commit is contained in:
1 parent
6a476fab1a
commit
d8c6aa8d8e
5 files changed
+895
-49
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
Delete,
|
||||
Body,
|
||||
Param,
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { Prisma } from '@prisma/client';
|
||||
@@ -192,5 +193,34 @@ export class SettingsController {
|
||||
) {
|
||||
return this.settingsService.editPattern(Number(bodyId), body);
|
||||
}
|
||||
|
||||
// SMS Logs & Tracking Endpoints
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin')
|
||||
@ApiBearerAuth()
|
||||
@Get('sms/logs')
|
||||
@ApiOperation({ summary: 'دریافت گزارشات و لاگهای کامل پیامکهای ارسالی با فیلتر و جستجو' })
|
||||
getSmsLogs(@Query() query: any) {
|
||||
return this.settingsService.getSmsLogs(query);
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin')
|
||||
@ApiBearerAuth()
|
||||
@Delete('sms/logs/:id')
|
||||
@ApiOperation({ summary: 'حذف یک رکورد لاگ پیامک' })
|
||||
deleteSmsLog(@Param('id') id: string) {
|
||||
return this.settingsService.deleteSmsLog(id);
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin')
|
||||
@ApiBearerAuth()
|
||||
@Delete('sms/logs')
|
||||
@ApiOperation({ summary: 'پاکسازی تمامی لاگهای پیامک' })
|
||||
clearAllSmsLogs() {
|
||||
return this.settingsService.clearAllSmsLogs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user