mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Fixed one auth method
This commit is contained in:
parent
396f7c1b8e
commit
def6634a5b
|
@ -14,7 +14,7 @@ import {
|
||||||
export class MicrosoftCosmosDbSharedKeyApi implements ICredentialType {
|
export class MicrosoftCosmosDbSharedKeyApi implements ICredentialType {
|
||||||
name = 'microsoftCosmosDbSharedKeyApi';
|
name = 'microsoftCosmosDbSharedKeyApi';
|
||||||
|
|
||||||
displayName = 'Azure Cosmos DB API';
|
displayName = 'Cosmos DB API';
|
||||||
|
|
||||||
documentationUrl = 'microsoftCosmosDb';
|
documentationUrl = 'microsoftCosmosDb';
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ export class CosmosDb implements INodeType {
|
||||||
group: ['transform'],
|
group: ['transform'],
|
||||||
version: 1,
|
version: 1,
|
||||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||||
description: 'Interact with Azure Cosmos DB API',
|
description: 'Interact with Cosmos DB API',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Azure Cosmos Db',
|
name: 'Cosmos Db',
|
||||||
},
|
},
|
||||||
inputs: [NodeConnectionType.Main],
|
inputs: [NodeConnectionType.Main],
|
||||||
outputs: [NodeConnectionType.Main],
|
outputs: [NodeConnectionType.Main],
|
||||||
|
@ -26,11 +26,6 @@ export class CosmosDb implements INodeType {
|
||||||
{
|
{
|
||||||
name: 'microsoftCosmosDbSharedKeyApi',
|
name: 'microsoftCosmosDbSharedKeyApi',
|
||||||
required: true,
|
required: true,
|
||||||
displayOptions: {
|
|
||||||
show: {
|
|
||||||
authentication: ['sharedKey'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
requestDefaults: {
|
requestDefaults: {
|
||||||
|
@ -41,28 +36,11 @@ export class CosmosDb implements INodeType {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
properties: [
|
properties: [
|
||||||
{
|
|
||||||
displayName: 'Authentication',
|
|
||||||
name: 'authentication',
|
|
||||||
type: 'options',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
name: 'Shared Key',
|
|
||||||
value: 'sharedKey',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
default: 'sharedKey',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
displayName: 'Resource',
|
displayName: 'Resource',
|
||||||
name: 'resource',
|
name: 'resource',
|
||||||
type: 'options',
|
type: 'options',
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
routing: {
|
|
||||||
// send: {
|
|
||||||
// preSend: [presendStringifyBody],
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Container',
|
name: 'Container',
|
||||||
|
|
|
@ -63,16 +63,6 @@ export function getAuthorizationTokenUsingMasterKey(
|
||||||
return `type=master&ver=1.0&sig=${signature}`;
|
return `type=master&ver=1.0&sig=${signature}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function presendStringifyBody(
|
|
||||||
this: IExecuteSingleFunctions,
|
|
||||||
requestOptions: IHttpRequestOptions,
|
|
||||||
): Promise<IHttpRequestOptions> {
|
|
||||||
if (requestOptions.body) {
|
|
||||||
requestOptions.body = JSON.stringify(requestOptions.body);
|
|
||||||
}
|
|
||||||
return requestOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function handlePagination(
|
export async function handlePagination(
|
||||||
this: IExecutePaginationFunctions,
|
this: IExecutePaginationFunctions,
|
||||||
resultOptions: DeclarativeRestApiSettings.ResultOptions,
|
resultOptions: DeclarativeRestApiSettings.ResultOptions,
|
||||||
|
|
Loading…
Reference in a new issue