Skip to content

Commit

Permalink
pass api key x-api-key
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoudz committed Mar 26, 2024
1 parent 803d123 commit 1a605aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/vuic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const config = require('./config');

class Vuic {
constructor(key) {
console.log('--[VUIC]-- constructor');
console.log('--[VUIC]-- constructor (v1)');
if (!key) {
console.log('A client_key must be provided');
throw new Error('A client_key must be provided');
Expand Down Expand Up @@ -79,9 +79,12 @@ class Vuic {
'functionsSignatures',
JSON.stringify(this.functionSignatures),
);

await fetch(`${config.vuicBaseURL}/processor/run`, {
method: 'POST',
headers: {
'x-api-key': this.key,
},
body: formData,
})
.then((response) => response.json())
Expand Down

0 comments on commit 1a605aa

Please sign in to comment.