feat: add file viewer and downloads
This commit is contained in:
@@ -5,6 +5,7 @@ import type { BoardVisibilityStatus } from "@kan/db/schema";
|
||||
import {
|
||||
boards,
|
||||
cardActivities,
|
||||
cardAttachments,
|
||||
cards,
|
||||
cardsToLabels,
|
||||
cardToWorkspaceMembers,
|
||||
@@ -196,6 +197,13 @@ export const getByPublicId = async (
|
||||
},
|
||||
},
|
||||
},
|
||||
attachments: {
|
||||
columns: {
|
||||
publicId: true,
|
||||
},
|
||||
where: isNull(cardAttachments.deletedAt),
|
||||
orderBy: asc(cardAttachments.createdAt),
|
||||
},
|
||||
checklists: {
|
||||
columns: {
|
||||
publicId: true,
|
||||
@@ -358,6 +366,13 @@ export const getBySlug = async (
|
||||
},
|
||||
},
|
||||
},
|
||||
attachments: {
|
||||
columns: {
|
||||
publicId: true,
|
||||
},
|
||||
where: isNull(cardAttachments.deletedAt),
|
||||
orderBy: asc(cardAttachments.createdAt),
|
||||
},
|
||||
comments: {
|
||||
columns: {
|
||||
publicId: true,
|
||||
|
||||
@@ -3,6 +3,7 @@ import { and, asc, desc, eq, gt, inArray, isNull, sql } from "drizzle-orm";
|
||||
import type { dbClient } from "@kan/db/client";
|
||||
import {
|
||||
cardActivities,
|
||||
cardAttachments,
|
||||
cards,
|
||||
cardsToLabels,
|
||||
cardToWorkspaceMembers,
|
||||
@@ -415,7 +416,10 @@ export const getWithListAndMembersByPublicId = async (
|
||||
contentType: true,
|
||||
s3Key: true,
|
||||
originalFilename: true,
|
||||
size: true,
|
||||
},
|
||||
where: isNull(cardAttachments.deletedAt),
|
||||
orderBy: asc(cardAttachments.createdAt),
|
||||
},
|
||||
checklists: {
|
||||
columns: {
|
||||
|
||||
Reference in New Issue
Block a user