hit-sms-api/src/chatwoot/chatwoot.controller.ts

36 lines
870 B
TypeScript

import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'
import { ChatwootService } from './chatwoot.service'
@Controller('chatwoot')
export class ChatwootController {
constructor (private readonly chatwootService: ChatwootService) {}
@Post('/webhook/:sms/:provider/:apikey/:inbox')
create (
@Param() params: { sms: string, provider: 'infobip', apikey: string, inbox: string }
) {
}
@Get()
findAll () {
return this.chatwootService.findAll()
}
@Get(':id')
findOne (@Param('id') id: string) {
return this.chatwootService.findOne(+id)
}
@Patch(':id')
update (@Param('id') id: string, @Body() updateChatwootDto: UpdateChatwootDto) {
return this.chatwootService.update(+id, updateChatwootDto)
}
@Delete(':id')
remove (@Param('id') id: string) {
return this.chatwootService.remove(+id)
}
}