fix: add sign up hook

This commit is contained in:
David Nguyen
2025-02-13 20:21:23 +11:00
parent 87dcdd44cd
commit ebc2b00067
13 changed files with 55 additions and 96 deletions

View File

@ -81,27 +81,7 @@ export async function loader({ params }: Route.LoaderArgs) {
throw redirect(documentRootPath);
}
const { documentMeta } = document;
// Todo: We don't handle encrypted files right.
// if (documentMeta?.password) {
// const key = DOCUMENSO_ENCRYPTION_KEY;
// if (!key) {
// throw new Error('Missing DOCUMENSO_ENCRYPTION_KEY');
// }
// const securePassword = Buffer.from(
// symmetricDecrypt({
// key,
// data: documentMeta.password,
// }),
// ).toString('utf-8');
// documentMeta.password = securePassword;
// }
// Todo: Get full document instead???
// Todo: Get full document instead?
const [recipients, fields] = await Promise.all([
getRecipientsForDocument({
documentId,

View File

@ -68,24 +68,6 @@ export async function loader({ params }: Route.LoaderArgs) {
throw redirect(`${documentRootPath}/${documentId}`);
}
// Todo: We don't handle encrypted files right.
// if (documentMeta?.password) {
// const key = DOCUMENSO_ENCRYPTION_KEY;
// if (!key) {
// throw new Error('Missing DOCUMENSO_ENCRYPTION_KEY');
// }
// const securePassword = Buffer.from(
// symmetricDecrypt({
// key,
// data: documentMeta.password,
// }),
// ).toString('utf-8');
// documentMeta.password = securePassword;
// }
const isDocumentEnterprise = await isUserEnterprise({
userId: user.id,
teamId: team?.id,

View File

@ -36,7 +36,7 @@ export async function loader({ params }: Route.LoaderArgs) {
throw redirect(documentRootPath);
}
// Todo: Get detailed?
// Todo: Get full document instead?
const [document, recipients] = await Promise.all([
getDocumentById({
documentId,