File tree Expand file tree Collapse file tree
src/services/item/plugins/importExport Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,8 +135,7 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
135135 reply . raw . setHeader ( 'Content-Disposition' , `attachment; filename="${ encodeFilename ( name ) } "` ) ;
136136 reply . type ( mimetype ) ;
137137
138- // BUG: cast because validation does not match
139- return stream as never ;
138+ return stream ;
140139 } ,
141140 ) ;
142141
Original file line number Diff line number Diff line change @@ -35,10 +35,7 @@ export const downloadFile = {
3535 } ) ,
3636 response : {
3737 // return a stream
38- [ StatusCodes . OK ] : Type . Object (
39- { data : Type . String ( ) } ,
40- { description : 'a stream of data for the export zip content' } ,
41- ) ,
38+ [ StatusCodes . OK ] : Type . Any ( { description : 'a stream of data for the export zip content' } ) ,
4239 '4xx' : errorSchemaRef ,
4340 } ,
4441} as const satisfies FastifySchema ;
@@ -54,7 +51,6 @@ export const exportZip = {
5451 itemId : customType . UUID ( ) ,
5552 } ) ,
5653 response : {
57- // return a stream
5854 [ StatusCodes . ACCEPTED ] : Type . Null ( { description : 'email with download link has been sent' } ) ,
5955 '4xx' : errorSchemaRef ,
6056 } ,
You can’t perform that action at this time.
0 commit comments