Skip to content

Commit

Permalink
fix: use jwt when persisted operation doc (#4938)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
sgrove and kodiakhq[bot] authored Aug 12, 2022
1 parent 55df500 commit e1b911f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/commands/graph/graph-edit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
const gitRepoInfo = require('git-repo-info')
const { OneGraphClient } = require('netlify-onegraph-internal')

const { OneGraphCliClient, ensureCLISession, upsertMergeCLISessionMetadata } = require('../../lib/one-graph/cli-client')
const {
Expand Down Expand Up @@ -40,6 +39,7 @@ const graphEdit = async (options, command) => {
}

const netlifyToken = await command.authenticate()
const { jwt } = await OneGraphCliClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })

await ensureAppForSite(netlifyToken, siteId)

Expand All @@ -62,8 +62,7 @@ const graphEdit = async (options, command) => {
tags: ['netlify-cli', `session:${oneGraphSessionId}`, `git-branch:${branch}`],
},
{
accessToken: netlifyToken,

accessToken: jwt,
siteId,
},
)
Expand All @@ -76,7 +75,6 @@ const graphEdit = async (options, command) => {

const newMetadata = { docId: persistedDoc.id }

const { jwt } = await OneGraphClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })
await upsertMergeCLISessionMetadata({
config,
jwt,
Expand Down

1 comment on commit e1b911f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

Package size: 222 MB

Please sign in to comment.