Potentially first working version of token fetching for zoom

pull/277/head
nicolas 2021-06-11 02:14:36 +02:00
parent 697cae9cc9
commit f44c8b6326
1 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import type {NextApiRequest, NextApiResponse} from 'next';
import {getSession} from "next-auth/client";
import prisma from "../../../../lib/prisma";
const client_id = process.env.ZOOM_CLIENT_ID;
const client_secret = process.env.ZOOM_CLIENT_SECRET;
@ -25,16 +26,15 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
Authorization: authHeader
}
})
.then(res => res.text());
console.log(result);
.then(res => res.json());
/*const credential = await prisma.credential.create({
const credential = await prisma.credential.create({
data: {
type: 'google_calendar',
key: 'lel',
type: 'zoom',
key: result.access_token,
userId: session.user.id
}
});*/
});
res.redirect('/integrations');
resolve();