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> { public async sendMessage(content: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) { for (const { webhook_url } of payload?.channels) {
try { try {
await axios.post(webhook_url, { return await axios.post(webhook_url, {
content, content,
}); });
} catch (e) { } 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> { public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) { for (const { webhook_url } of payload?.channels) {
try { try {
await axios.post(webhook_url, { return await axios.post(webhook_url, {
text, text,
}); });
} catch (e) { } 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> { public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) { for (const { webhook_url } of payload?.channels) {
try { try {
await axios.post(webhook_url, { return await axios.post(webhook_url, {
text, text,
}); });
} catch (e) { } 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> { public async sendMessage(Text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) { for (const { webhook_url } of payload?.channels) {
try { try {
await axios.post(webhook_url, { return await axios.post(webhook_url, {
Text, Text,
}); });
} catch (e) { } catch (e) {

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

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

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

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

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

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

Loading…
Cancel
Save