Skip to content

Commit

Permalink
style: Fixed docs send-poll-message
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jun 2, 2023
1 parent 681fb79 commit 8e75310
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions src/controller/messageController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,36 @@ export async function sendPollMessage(req: Request, res: Response) {
#swagger.parameters["session"] = {
schema: 'NERDWHATS_AMERICA'
}
#swagger.parameters["obj"] = {
in: 'body',
schema: {
$phone: '5521999999999',
$isGroup: false,
$name: 'Poll name',
$choices: ['Option 1', 'Option 2', 'Option 3'],
$options: {
$selectableCount: '1',
#swagger.requestBody = {
required: true,
"@content": {
"application/json": {
schema: {
type: "object",
properties: {
phone: { type: "string" },
isGroup: { type: "boolean" },
name: { type: "string" },
choices: { type: "array" },
options: { type: "object" },
}
},
examples: {
"Default": {
value: {
phone: '5521999999999',
isGroup: false,
name: 'Poll name',
choices: ['Option 1', 'Option 2', 'Option 3'],
options: {
selectableCount: 1,
}
}
},
}
}
}
}
}
}
*/
const { phone, name, choices, options } = req.body;

Expand Down

0 comments on commit 8e75310

Please sign in to comment.