feat(Slack Node): Update to use the new API method for file uploads (#9323)

This commit is contained in:
Jon
2024-05-08 10:40:24 +01:00
committed by GitHub
parent 435272b568
commit 695e762663
4 changed files with 120 additions and 24 deletions

View File

@@ -29,7 +29,7 @@ export async function slackApiRequest(
},
body,
qs: query,
uri: `https://slack.com/api${resource}`,
uri: resource.startsWith('https') ? resource : `https://slack.com/api${resource}`,
json: true,
};
options = Object.assign({}, options, option);
@@ -78,6 +78,7 @@ export async function slackApiRequest(
},
);
}
throw new NodeOperationError(
this.getNode(),
'Slack error response: ' + JSON.stringify(response.error),