File tree Expand file tree Collapse file tree
migrations/20240730000000_update_link_defaults Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ import {
1313 getMimeTypeFromSupportedType ,
1414} from "@/lib/utils/get-content-type" ;
1515
16+ export const config = {
17+ maxDuration : 180 ,
18+ } ;
19+
1620const s3Client = getS3Client ( ) ;
1721const s3Service = new S3DownloadService ( s3Client ) ;
1822
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export default async function handle(
2929 } ,
3030 document : {
3131 select : {
32+ teamId : true ,
3233 versions : {
3334 where : { isPrimary : true } ,
3435 select : {
@@ -82,6 +83,15 @@ export default async function handle(
8283 data : { downloadedAt : new Date ( ) } ,
8384 } ) ;
8485
86+ // TODO: team hardcode for special download
87+ if (
88+ view . document ! . teamId === "clwt1qwt00000qz39aqra71w6" &&
89+ view . document ! . versions [ 0 ] . type === "sheet"
90+ ) {
91+ const downloadUrl = view . document ! . versions [ 0 ] . file ;
92+ return res . status ( 200 ) . json ( { downloadUrl } ) ;
93+ }
94+
8595 const downloadUrl = await getFile ( {
8696 type : view . document ! . versions [ 0 ] . storageType ,
8797 data : view . document ! . versions [ 0 ] . file ,
Original file line number Diff line number Diff line change 1+ -- AlterTable
2+ ALTER TABLE " Link" ALTER COLUMN " enableFeedback" SET DEFAULT false;
3+
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ model Link {
223223 createdAt DateTime @default (now () )
224224 updatedAt DateTime @updatedAt
225225 enableNotification Boolean ? @default (true ) // Optional give user a option to pause/resume the notifications
226- enableFeedback Boolean ? @default (true ) // Optional give user a option to enable the reactions toolbar
226+ enableFeedback Boolean ? @default (false ) // Optional give user a option to enable the reactions toolbar
227227 enableQuestion Boolean ? @default (false ) // Optional give user a option to enable the question feedback
228228 enableScreenshotProtection Boolean ? @default (false ) // Optional give user a option to enable the screenshot protection
229229 feedback Feedback ?
You can’t perform that action at this time.
0 commit comments