Browse Source

fix(nocodb): return axios response

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
7817818bd0
  1. 2
      packages/nocodb/src/lib/plugins/discord/Discord.ts
  2. 2
      packages/nocodb/src/lib/plugins/mattermost/Mattermost.ts
  3. 2
      packages/nocodb/src/lib/plugins/slack/Slack.ts
  4. 2
      packages/nocodb/src/lib/plugins/teams/Teams.ts
  5. 2
      packages/nocodb/src/lib/v1-legacy/plugins/adapters/discord/Discord.ts
  6. 2
      packages/nocodb/src/lib/v1-legacy/plugins/adapters/mattermost/Mattermost.ts
  7. 2
      packages/nocodb/src/lib/v1-legacy/plugins/adapters/slack/Slack.ts

2
packages/nocodb/src/lib/plugins/discord/Discord.ts

@ -9,7 +9,7 @@ export default class Discord implements IWebhookNotificationAdapter {
public async sendMessage(content: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
content,
});
} catch (e) {

2
packages/nocodb/src/lib/plugins/mattermost/Mattermost.ts

@ -9,7 +9,7 @@ export default class Mattermost implements IWebhookNotificationAdapter {
public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
text,
});
} catch (e) {

2
packages/nocodb/src/lib/plugins/slack/Slack.ts

@ -9,7 +9,7 @@ export default class Slack implements IWebhookNotificationAdapter {
public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
text,
});
} catch (e) {

2
packages/nocodb/src/lib/plugins/teams/Teams.ts

@ -9,7 +9,7 @@ export default class Teams implements IWebhookNotificationAdapter {
public async sendMessage(Text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
Text,
});
} catch (e) {

2
packages/nocodb/src/lib/v1-legacy/plugins/adapters/discord/Discord.ts

@ -9,7 +9,7 @@ export default class Discord {
): Promise<any> {
for (const { webhook_url } of webhooks) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
content,
});
} catch (e) {

2
packages/nocodb/src/lib/v1-legacy/plugins/adapters/mattermost/Mattermost.ts

@ -9,7 +9,7 @@ export default class Mattermost {
): Promise<any> {
for (const { webhook_url } of webhooks) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
text,
});
} catch (e) {

2
packages/nocodb/src/lib/v1-legacy/plugins/adapters/slack/Slack.ts

@ -9,7 +9,7 @@ export default class Slack {
): Promise<any> {
for (const { webhook_url } of webhooks) {
try {
await axios.post(webhook_url, {
return await axios.post(webhook_url, {
text,
});
} catch (e) {

Loading…
Cancel
Save