Skip to content

Commit

Permalink
🚸 (sheets) Auto set credentials after oauth…
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jul 18, 2024
1 parent 1f71b86 commit 431e29b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/builder/src/pages/api/credentials/google-sheets/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
return {
...group,
blocks: group.blocks.map((block) => {
if (block.id !== blockId || !('options' in block)) return block
if (block.id !== blockId) return block
return {
...block,
options: {
...block.options,
credentialsId,
},
options:
'options' in block
? { ...block.options, credentialsId }
: {
credentialsId,
},
}
}),
}
Expand Down

0 comments on commit 431e29b

Please sign in to comment.