mirror of
https://github.com/makeplane/plane.git
synced 2026-02-24 20:20:49 +01:00
chore: updated slack service to return fetch calls and errors
This commit is contained in:
@@ -104,7 +104,7 @@ export class SlackService {
|
||||
const slackAccessToken = slackConfig.slackConfig.access_token;
|
||||
|
||||
try {
|
||||
await fetch("https://slack.com/api/views.open", {
|
||||
return await fetch("https://slack.com/api/views.open", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
trigger_id: triggerId,
|
||||
@@ -127,7 +127,7 @@ export class SlackService {
|
||||
}
|
||||
const slackAccessToken = slackConfig.slackConfig.access_token;
|
||||
try {
|
||||
await fetch("https://slack.com/api/views.update", {
|
||||
return await fetch("https://slack.com/api/views.update", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
view_id: viewId,
|
||||
|
||||
@@ -126,8 +126,10 @@ export interface ISlackMessage {
|
||||
export interface ISlackAction {
|
||||
action_id: string;
|
||||
block_id: string;
|
||||
text: Text;
|
||||
value: string;
|
||||
selected_option?: {
|
||||
text: ISlackText;
|
||||
value: string;
|
||||
};
|
||||
type: string;
|
||||
action_ts: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user