Skip to content

Commit 4647951

Browse files
authored
Fix? (#255)
1 parent 3b5cc8c commit 4647951

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,17 @@ export class EmailController {
6565
@Get('logo')
6666
async getImageLogo(@Res() res: Response) {
6767
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}`);
68+
console.log('ImagePath: ', imagePath);
69+
70+
if (fs.existsSync(imagePath)) {
71+
res.sendFile(imagePath, {
72+
headers: {
73+
'Content-Type': 'image/png',
74+
'Cache-Control': 'public, max-age=86400',
75+
},
76+
});
77+
} else {
78+
res.status(404).send('File not found');
79+
}
7080
}
7181
}

apps/api/src/intern/intern.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export class InternService {
276276
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600" style="background:#ffffff; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,0.1); overflow:hidden;">
277277
<tr>
278278
<td align="center" style="padding:20px;">
279-
<img src="https://internship.dump.hr/api/email/image/logo" alt="DUMP Logo" width="180" />
279+
<img src="https://internship.dump.hr/api/email/logo" alt="DUMP Logo" width="180" />
280280
</td>
281281
</tr>
282282
<tr>

apps/api/src/interview-slot/interview-slot.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Vidimo se!
315315
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600" style="background:#ffffff; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,0.1); overflow:hidden;">
316316
<tr>
317317
<td align="center" style="padding:20px;">
318-
<img src="https://internship.dump.hr/api/email/image/logo" alt="DUMP Logo" width="180" />
318+
<img src="https://internship.dump.hr/api/email/logo" alt="DUMP Logo" width="180" />
319319
</td>
320320
</tr>
321321
<tr>

apps/api/src/test-slot/test-slot.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export class TestSlotService {
229229
<tr>
230230
<td align="center" style="padding:20px;">
231231
<!-- LOGO Placeholder -->
232-
<img src="https://internship.dump.hr/api/email/image/logo" alt="DUMP Logo" width="180" />
232+
<img src="https://internship.dump.hr/api/email/logo" alt="DUMP Logo" width="180" />
233233
</td>
234234
</tr>
235235
<tr>

0 commit comments

Comments
 (0)