mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
feat: add envelopes (#2025)
This PR is handles the changes required to support envelopes. The new envelope editor/signing page will be hidden during release. The core changes here is to migrate the documents and templates model to a centralized envelopes model. Even though Documents and Templates are removed, from the user perspective they will still exist as we remap envelopes to documents and templates.
This commit is contained in:
@ -21,7 +21,14 @@ type GetMemberRolesOptions = {
|
||||
* Returns the highest Team role of a given member or user of a team
|
||||
*/
|
||||
export const getMemberRoles = async ({ teamId, reference }: GetMemberRolesOptions) => {
|
||||
const team = await prisma.team.findFirst({
|
||||
// Enforce incase teamId undefined slips through due to invalid types.
|
||||
if (teamId === undefined) {
|
||||
throw new AppError(AppErrorCode.NOT_FOUND, {
|
||||
message: 'Team not found',
|
||||
});
|
||||
}
|
||||
|
||||
const team = await prisma.team.findUnique({
|
||||
where: {
|
||||
id: teamId,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user