Skip to content

Commit

Permalink
Change the SendTestMessage API to be a POST call (#506)
Browse files Browse the repository at this point in the history
* Change the SendTestMessage API to be a POST call

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Include GET send test message path as a depricated option until next major version

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Update documentation comment for SendTestMessage replaced route

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
  • Loading branch information
qreshi authored and ansjcy committed Jan 9, 2023
1 parent 53ba269 commit 2fa9f01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/services/NotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default class NotificationService {
sendTestMessage = async (
configId: string
) => {
const response = await this.httpClient.get(
const response = await this.httpClient.post(
`${NODE_API.SEND_TEST_MESSAGE}/${configId}`
);
if (response.status_list[0].delivery_status.status_code != 200) {
Expand Down
2 changes: 1 addition & 1 deletion server/clusters/notificationsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function NotificationsPlugin(Client: any, config: any, components: any) {
},
},
},
method: 'GET',
method: 'POST',
});

notifications.getServerFeatures = clientAction({
Expand Down
2 changes: 1 addition & 1 deletion server/routes/eventRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function eventRoutes(router: IRouter) {
}
);

router.get(
router.post(
{
path: `${NODE_API.SEND_TEST_MESSAGE}/{configId}`,
validate: {
Expand Down

0 comments on commit 2fa9f01

Please sign in to comment.