Skip to content

Commit 3b5cc8c

Browse files
authored
Ninom5/248 change email layout (#252)
* Add new email design and image controller * Update image path * update production env * fix * fix
1 parent 49fe018 commit 3b5cc8c

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

apps/api/nest-cli.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
"compilerOptions": {
66
"deleteOutDir": true,
77
"builder": "swc",
8-
"typeCheck": true
8+
"typeCheck": true,
9+
"assets": [
10+
{
11+
"include": "logo/**/*",
12+
"outDir": "dist"
13+
}
14+
]
915
}
1016
}

apps/api/src/email/email.controller.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ export class EmailController {
6464

6565
@Get('logo')
6666
async getImageLogo(@Res() res: Response) {
67-
const imagePath = join(__dirname, '..', 'logo', 'dump-logo.png');
68-
console.log(imagePath);
69-
res.setHeader('Content-Type', 'image/png');
70-
71-
const stream = fs.createReadStream(imagePath);
72-
stream.pipe(res);
67+
const imagePath = join(__dirname, 'logo', 'dump-logo-internship.png');
68+
if (fs.existsSync(imagePath)) res.sendFile(imagePath);
69+
else res.status(404).send(`File not found: ${imagePath}`);
7370
}
7471
}
15.2 KB
Loading

apps/api/src/logo/dump-logo.png

-11.6 KB
Loading

0 commit comments

Comments
 (0)