Skip to content

Commit

Permalink
tested working on kv data
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmssdish committed Dec 19, 2023
1 parent a52d91a commit 89801ad
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions findr/oracle/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,16 @@ class Oracle {
const vaultToken = process.env.VAULT_TOKEN ?? ''
const vaultPath = `${deviceId}-${this.uuid}`
console.log('vaultPath:', vaultPath)
const vaultPathObject ={
"data": {"vaultPath": vaultPath},
"options": {},
"version": 0
}
try {
const vaultValue = this.messageToSent
// const vaultValue = this.messageToSent // This is for chubbyhole
const vaultClient = new VaultClient(vaultUrl)
await vaultClient.authenticate(vaultToken)
const vaultWriteResponse = await vaultClient.writeSecret(vaultPath, vaultValue)
const vaultWriteResponse = await vaultClient.writeSecret(vaultPath, vaultPathObject)
console.log('vaultWriteResponse:', vaultWriteResponse)
} catch (error) {
// Handle errors
Expand All @@ -433,9 +438,6 @@ class Oracle {
}

try {
const vaultPathObject = {
vaultPath
}
const sendOrchestratorRequestUrl = process.env.FINDR_ORCHESTRATOR_URL ?? ''
const sendOrchestratorRequestResponse = await this.sendOrchestratorRequest(
sendOrchestratorRequestUrl,
Expand Down

0 comments on commit 89801ad

Please sign in to comment.