mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Linear Node): Fix issue with single item not being returned (#5193)
This commit is contained in:
committed by
GitHub
parent
454375077f
commit
e810966a3b
@@ -22,14 +22,11 @@ export async function linearApiRequest(
|
||||
body: any = {},
|
||||
option: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('linearApi');
|
||||
|
||||
const endpoint = 'https://api.linear.app/graphql';
|
||||
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: credentials.apiKey,
|
||||
},
|
||||
method: 'POST',
|
||||
body,
|
||||
@@ -38,7 +35,7 @@ export async function linearApiRequest(
|
||||
};
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'linearApi', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user