mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
feat: migrate templates and documents to envelope model
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { findDocuments } from '@documenso/lib/server-only/document/find-documents';
|
||||
import { mapEnvelopesToDocumentMany } from '@documenso/lib/utils/document';
|
||||
|
||||
import { authenticatedProcedure } from '../trpc';
|
||||
import {
|
||||
@ -39,5 +40,8 @@ export const findDocumentsRoute = authenticatedProcedure
|
||||
orderBy: orderByColumn ? { column: orderByColumn, direction: orderByDirection } : undefined,
|
||||
});
|
||||
|
||||
return documents;
|
||||
return {
|
||||
...documents,
|
||||
data: documents.data.map((envelope) => mapEnvelopesToDocumentMany(envelope)),
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user