import { Controller, Get, Post } from '@nestjs/common';
import { Paginate, PaginateQuery } from 'nestjs-paginate';
import { SendMessageHistoriesService } from '../../services/send-message-histories.service';

@Controller('admin/send-message-histories')
export class AdminSendMessageHistoriesController {
  constructor(
    private readonly sendMessageService: SendMessageHistoriesService,
  ) {}

  @Get()
  async index(@Paginate() query: PaginateQuery) {
    return await this.sendMessageService.index(query);
  }

  @Post('send-test')
  async sendTest() {
    return await this.sendMessageService.sendTestMessage();
  }
}
