fix: removed link preview endpoint, now it's done automatically from sending conventional text

This commit is contained in:
Davidson Gomes
2023-07-16 17:57:37 -03:00
parent ec7ad70458
commit b9eb8d45b2
6 changed files with 6 additions and 70 deletions

View File

@@ -3,7 +3,6 @@ import {
audioMessageSchema,
buttonMessageSchema,
contactMessageSchema,
linkPreviewSchema,
listMessageSchema,
locationMessageSchema,
mediaMessageSchema,
@@ -17,7 +16,6 @@ import {
SendAudioDto,
SendButtonDto,
SendContactDto,
SendLinkPreviewDto,
SendListDto,
SendLocationDto,
SendMediaDto,
@@ -199,23 +197,6 @@ export class MessageRouter extends RouterBroker {
return res.status(HttpStatus.CREATED).json(response);
})
.post(this.routerPath('sendLinkPreview'), ...guards, async (req, res) => {
logger.verbose('request received in sendLinkPreview');
logger.verbose('request body: ');
logger.verbose(req.body);
logger.verbose('request query: ');
logger.verbose(req.query);
const response = await this.dataValidate<SendLinkPreviewDto>({
request: req,
schema: linkPreviewSchema,
ClassRef: SendLinkPreviewDto,
execute: (instance, data) =>
sendMessageController.sendLinkPreview(instance, data),
});
return res.status(HttpStatus.CREATED).json(response);
})
.post(this.routerPath('sendSticker'), ...guards, async (req, res) => {
logger.verbose('request received in sendSticker');
logger.verbose('request body: ');