chore: Typescript database models (#2886)

closes #2798
This commit is contained in:
Tom Moor
2022-01-06 18:24:28 -08:00
committed by GitHub
parent d3cbf250e6
commit b20a341f0c
207 changed files with 5624 additions and 5315 deletions

View File

@@ -1,7 +1,6 @@
import { Share } from "@server/models";
import { presentUser } from ".";
// @ts-expect-error ts-migrate(2749) FIXME: 'Share' refers to a value, but is being used as a ... Remove this comment to see the full error message
export default function present(share: Share, isAdmin = false) {
const data = {
id: share.id,
@@ -12,7 +11,7 @@ export default function present(share: Share, isAdmin = false) {
url: `${share.team.url}/share/${share.id}`,
createdBy: presentUser(share.user),
includeChildDocuments: share.includeChildDocuments,
lastAccessedAt: share.lastAccessedAt,
lastAccessedAt: share.lastAccessedAt || undefined,
createdAt: share.createdAt,
updatedAt: share.updatedAt,
};