|
@@ -202,6 +202,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getOverallStatistics = async (req: Request, res: Response): Promise<Response> => {
|
|
public getOverallStatistics = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getOverallStatistics");
|
|
|
const stats = await this.messageRecordService.getOverallStatistics();
|
|
const stats = await this.messageRecordService.getOverallStatistics();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
@@ -217,6 +218,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getStatisticsByActivity = async (req: Request, res: Response): Promise<Response> => {
|
|
public getStatisticsByActivity = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getStatisticsByActivity");
|
|
|
const stats = await this.messageRecordService.getStatisticsByActivity();
|
|
const stats = await this.messageRecordService.getStatisticsByActivity();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
@@ -232,6 +234,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getStatisticsByStrategy = async (req: Request, res: Response): Promise<Response> => {
|
|
public getStatisticsByStrategy = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getStatisticsByStrategy");
|
|
|
const stats = await this.messageRecordService.getStatisticsByStrategy();
|
|
const stats = await this.messageRecordService.getStatisticsByStrategy();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
@@ -247,6 +250,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getStatisticsByTemplate = async (req: Request, res: Response): Promise<Response> => {
|
|
public getStatisticsByTemplate = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getStatisticsByTemplate");
|
|
|
const stats = await this.messageRecordService.getStatisticsByTemplate();
|
|
const stats = await this.messageRecordService.getStatisticsByTemplate();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
@@ -262,6 +266,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getDailySentTrends = async (req: Request, res: Response): Promise<Response> => {
|
|
public getDailySentTrends = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getDailySentTrends");
|
|
|
const stats = await this.messageRecordService.getDailySentTrends();
|
|
const stats = await this.messageRecordService.getDailySentTrends();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
@@ -277,6 +282,7 @@ class MessageRecordController {
|
|
|
*/
|
|
*/
|
|
|
public getAverageDeliveryTime = async (req: Request, res: Response): Promise<Response> => {
|
|
public getAverageDeliveryTime = async (req: Request, res: Response): Promise<Response> => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log("getAverageDeliveryTime");
|
|
|
const stats = await this.messageRecordService.getAverageDeliveryTime();
|
|
const stats = await this.messageRecordService.getAverageDeliveryTime();
|
|
|
return res.status(200).json({ success: true, data: stats });
|
|
return res.status(200).json({ success: true, data: stats });
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|