File tree 4 files changed +18
-1
lines changed
migrations/20240730000000_update_link_defaults
4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ import {
13
13
getMimeTypeFromSupportedType ,
14
14
} from "@/lib/utils/get-content-type" ;
15
15
16
+ export const config = {
17
+ maxDuration : 180 ,
18
+ } ;
19
+
16
20
const s3Client = getS3Client ( ) ;
17
21
const s3Service = new S3DownloadService ( s3Client ) ;
18
22
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export default async function handle(
29
29
} ,
30
30
document : {
31
31
select : {
32
+ teamId : true ,
32
33
versions : {
33
34
where : { isPrimary : true } ,
34
35
select : {
@@ -82,6 +83,15 @@ export default async function handle(
82
83
data : { downloadedAt : new Date ( ) } ,
83
84
} ) ;
84
85
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
+
85
95
const downloadUrl = await getFile ( {
86
96
type : view . document ! . versions [ 0 ] . storageType ,
87
97
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 {
223
223
createdAt DateTime @default (now () )
224
224
updatedAt DateTime @updatedAt
225
225
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
227
227
enableQuestion Boolean ? @default (false ) // Optional give user a option to enable the question feedback
228
228
enableScreenshotProtection Boolean ? @default (false ) // Optional give user a option to enable the screenshot protection
229
229
feedback Feedback ?
You can’t perform that action at this time.
0 commit comments