Potentially first working version of token fetching for zoom
This commit is contained in:
parent
697cae9cc9
commit
f44c8b6326
1 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
import type {NextApiRequest, NextApiResponse} from 'next';
|
import type {NextApiRequest, NextApiResponse} from 'next';
|
||||||
import {getSession} from "next-auth/client";
|
import {getSession} from "next-auth/client";
|
||||||
|
import prisma from "../../../../lib/prisma";
|
||||||
|
|
||||||
const client_id = process.env.ZOOM_CLIENT_ID;
|
const client_id = process.env.ZOOM_CLIENT_ID;
|
||||||
const client_secret = process.env.ZOOM_CLIENT_SECRET;
|
const client_secret = process.env.ZOOM_CLIENT_SECRET;
|
||||||
|
@ -25,16 +26,15 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
Authorization: authHeader
|
Authorization: authHeader
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(res => res.text());
|
.then(res => res.json());
|
||||||
console.log(result);
|
|
||||||
|
|
||||||
/*const credential = await prisma.credential.create({
|
const credential = await prisma.credential.create({
|
||||||
data: {
|
data: {
|
||||||
type: 'google_calendar',
|
type: 'zoom',
|
||||||
key: 'lel',
|
key: result.access_token,
|
||||||
userId: session.user.id
|
userId: session.user.id
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
|
|
||||||
res.redirect('/integrations');
|
res.redirect('/integrations');
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in a new issue