2
0

fix: 🐛 Tiny bugs (Sentry)

This commit is contained in:
Baptiste Arnaud
2022-02-25 18:30:14 +01:00
parent d21b1722b5
commit 9e08ff574b
8 changed files with 38 additions and 26 deletions

View File

@ -16,14 +16,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'GET') {
const credentialsId = req.query.credentialsId.toString()
const auth = await getAuthenticatedGoogleClient(user.id, credentialsId)
const { data } = await drive({
const response = await drive({
version: 'v3',
auth,
}).files.list({
q: "mimeType='application/vnd.google-apps.spreadsheet'",
fields: 'nextPageToken, files(id, name)',
})
return res.send(data)
return res.send(response.data)
}
return methodNotAllowed(res)
}