mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 01:32:06 +10:00
todo, qoc
This commit is contained in:
@ -45,6 +45,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
},
|
||||
});
|
||||
|
||||
// todo check if recipient has an account and show them in their inbox or something
|
||||
(await recipients).forEach(async (recipient) => {
|
||||
await sendSigningRequestMail(recipient, document);
|
||||
});
|
||||
|
||||
@ -49,19 +49,19 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
let user = await getUserFromToken(req, res);
|
||||
if (!user) return;
|
||||
|
||||
return res.status(200).json(
|
||||
await prisma.document.findMany({
|
||||
where: {
|
||||
userId: user?.id,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
status: true,
|
||||
Recipient: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
const documents = await prisma.document.findMany({
|
||||
where: {
|
||||
userId: user?.id,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
status: true,
|
||||
Recipient: true,
|
||||
},
|
||||
});
|
||||
|
||||
return res.status(200).json(documents);
|
||||
}
|
||||
|
||||
export default defaultHandler({
|
||||
|
||||
Reference in New Issue
Block a user