2
0

🚸 (sheets) Auto set credentials after oauth…

This commit is contained in:
Baptiste Arnaud
2024-07-18 16:17:24 +02:00
parent 1f71b86f09
commit 431e29b41e

View File

@ -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,
},
}
}),
}