import { Controller, Get } from '@nestjs/common';
import { PusherChannel, PusherEvent } from 'nestjs-pusher';
@Controller('cats')
export class CatsController {
constructor(private readonly catService: CatService) {
}
@PusherChannel('private-channels-of-cats')
@PusherEvent('cat.created')
@Post()
async createCat(@Body() dto): string {
const newCat = await this.catService.create(dto)
return newCat
}
}