Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit 002320e

Browse files
committed
credentials: apiKey
1 parent 1ac7732 commit 002320e

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

credentials/CodeChatCredentialsApi.credentials.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export class CodeChatCredentialsApi implements ICredentialType {
1414
},
1515

1616
{
17-
displayName: 'License Key',
18-
name: 'licenseKey',
17+
displayName: 'Authorization (apiKey)',
18+
name: 'apiKey',
1919
type: 'string',
2020
default: '',
2121
required: true,
@@ -32,5 +32,5 @@ export class CodeChatCredentialsApi implements ICredentialType {
3232
hint: 'Inform the url provided by your service provider',
3333
},
3434
];
35-
documentationUrl = 'https://api.codechat.rest/codechat/docs';
35+
documentationUrl = 'https://api.codechat.dev/docs';
3636
}

nodes/CodeChat/CodeChat.node.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ export class CodeChat implements INodeType {
1515
credentials: [{ name: 'codeChatApi', required: true }],
1616
inputs: ['main'],
1717
outputs: ['main'],
18-
requestDefaults: { baseURL: '={{$credentials.baseUrl}}' },
18+
requestDefaults: {
19+
baseURL: '={{$credentials.baseUrl}}',
20+
headers: {
21+
apiKey: '={{$credentials.apiKey}}'
22+
}
23+
},
1924
properties: [
2025
{
2126
displayName: 'Resource',

nodes/CodeChat/Generic.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function join(...paths: string[]) {
4141
}
4242

4343
export function requestURL(...paths: string[]) {
44-
return join('{{$credentials.instanceName}}', ...paths, '{{$credentials.licenseKey}}');
44+
return join('{{$credentials.instanceName}}', ...paths);
4545
}
4646

4747
export async function formatNumber(

nodes/CodeChat/descriptions/SendMessage.desc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ export const listProperties: INodeProperties[] = [
10661066
request: {
10671067
url: '=' + requestURL('message', 'sendList'),
10681068
method: 'POST',
1069+
h
10691070
},
10701071
send: { preSend: [sendListMessage] },
10711072
},

0 commit comments

Comments
 (0)