File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/modules/files/controllers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ export class FilesController {
36
36
} )
37
37
@Get ( ':chatId/:fileId' )
38
38
downFile ( @Param ( 'chatId' ) chatId : string , @Param ( 'fileId' ) fileId : string , @Res ( ) reply : FastifyReply ) {
39
+ return this . filesService . downFile ( chatId , fileId , reply ) ;
40
+ }
41
+
42
+ @Get ( 'vpn' )
43
+ getVPNProfile ( @Res ( ) reply : FastifyReply ) {
39
44
const STORAGE_ROOT = join ( process . cwd ( ) , 'vpn.mobileconfig' ) ;
40
45
41
46
const file = fs . readFileSync ( STORAGE_ROOT ) ;
@@ -44,6 +49,5 @@ export class FilesController {
44
49
. header ( 'Content-Type' , 'application/x-apple-aspen-config' )
45
50
. header ( 'Content-Disposition' , 'attachment; filename="vpn.mobileconfig"' )
46
51
. send ( file ) ;
47
- // return this.filesService.downFile(chatId, fileId, reply);
48
52
}
49
53
}
You can’t perform that action at this time.
0 commit comments