1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-11-11 01:28:58 +03:00

🐛 Fix bug that OAuth1 requests did not work anymore

This commit is contained in:
Jan Oberhauser 2020-12-10 10:39:11 +01:00
parent c87382c086
commit b73349a3a5

View File

@ -241,6 +241,15 @@ export function requestOAuth1(this: IAllExecuteFunctions, credentialsType: strin
//@ts-ignore
requestOptions.data = { ...requestOptions.qs, ...requestOptions.form };
// Fixes issue that OAuth1 library only works with "url" property and not with "uri"
// @ts-ignore
if (requestOptions.uri && !requestOptions.url) {
// @ts-ignore
requestOptions.url = requestOptions.uri;
// @ts-ignore
delete requestOptions.uri;
}
//@ts-ignore
requestOptions.headers = oauth.toHeader(oauth.authorize(requestOptions, token));