mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
feat: send ptv message
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
SendLocationDto,
|
||||
SendMediaDto,
|
||||
SendPollDto,
|
||||
SendPtvDto,
|
||||
SendReactionDto,
|
||||
SendStatusDto,
|
||||
SendStickerDto,
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
locationMessageSchema,
|
||||
mediaMessageSchema,
|
||||
pollMessageSchema,
|
||||
ptvMessageSchema,
|
||||
reactionMessageSchema,
|
||||
statusMessageSchema,
|
||||
stickerMessageSchema,
|
||||
@@ -71,6 +73,18 @@ export class MessageRouter extends RouterBroker {
|
||||
|
||||
return res.status(HttpStatus.CREATED).json(response);
|
||||
})
|
||||
.post(this.routerPath('sendPtv'), ...guards, upload.single('file'), async (req, res) => {
|
||||
const bodyData = req.body;
|
||||
|
||||
const response = await this.dataValidate<SendPtvDto>({
|
||||
request: req,
|
||||
schema: ptvMessageSchema,
|
||||
ClassRef: SendPtvDto,
|
||||
execute: (instance) => sendMessageController.sendPtv(instance, bodyData, req.file as any),
|
||||
});
|
||||
|
||||
return res.status(HttpStatus.CREATED).json(response);
|
||||
})
|
||||
.post(this.routerPath('sendWhatsAppAudio'), ...guards, upload.single('file'), async (req, res) => {
|
||||
const bodyData = req.body;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user