Skip to content

Commit 26ed817

Browse files
authored
Merge pull request #14 from Passimx/test-check-vpn
feat: add check vpn
2 parents e6895c0 + 66f4d16 commit 26ed817

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/files/controllers/files.controller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export class FilesController {
3636
})
3737
@Get(':chatId/:fileId')
3838
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) {
3944
const STORAGE_ROOT = join(process.cwd(), 'vpn.mobileconfig');
4045

4146
const file = fs.readFileSync(STORAGE_ROOT);
@@ -44,6 +49,5 @@ export class FilesController {
4449
.header('Content-Type', 'application/x-apple-aspen-config')
4550
.header('Content-Disposition', 'attachment; filename="vpn.mobileconfig"')
4651
.send(file);
47-
// return this.filesService.downFile(chatId, fileId, reply);
4852
}
4953
}

0 commit comments

Comments
 (0)