N8N-4126 credentials injection and testing on specific nodes (#3816)

* Add credential injection and testing to Lemlist, Uproc, Supabase, Segment, Phantombuster, Mailgun and Dropcontact
This commit is contained in:
agobrech
2022-08-24 10:26:48 +02:00
committed by GitHub
parent 5285fc1de6
commit 76f9ad8bae
15 changed files with 167 additions and 114 deletions

View File

@@ -39,8 +39,6 @@ export async function supabaseApiRequest(
const options: OptionsWithUri = {
headers: {
apikey: credentials.serviceRole,
Authorization: 'Bearer ' + credentials.serviceRole,
Prefer: 'return=representation',
},
method,
@@ -56,8 +54,8 @@ export async function supabaseApiRequest(
if (Object.keys(body).length === 0) {
delete options.body;
}
//@ts-ignore
return await this.helpers?.request(options);
return await this.helpers.requestWithAuthentication.call(this, 'supabaseApi', options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
}