Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit b948e53

Browse files
Update legal.js
Add routes for PDF downloads.
1 parent 9556efa commit b948e53

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/routes/legal.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ router.get(['/tos', '/tac', '/termsofservice', '/terms-of-service'], (req, res)
3232
res.render('legal/tos.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
3333
});
3434

35+
/**
36+
* Route serving termsofservice PDF
37+
* @name get/termsofservice
38+
* @function
39+
* @memberof modules:routes/legal
40+
* @inner
41+
*/
42+
router.get(['/tos-pdf', '/tac-pdf', '/termsofservice-pdf', '/terms-of-service-pdf'], (req, res) => {
43+
res.download("./views/legal/tos-pdf.pdf")
44+
});
45+
3546
/**
3647
* Route serving termsofservice archive
3748
* @name get/termsofservice
@@ -62,6 +73,17 @@ router.get(['/privacy', '/privacy-policy', '/privacypolicy'], (req, res) => {
6273
res.render('legal/privacy.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
6374
});
6475

76+
/**
77+
* Route serving privacy policy PDF
78+
* @name get/privacy
79+
* @function
80+
* @memberof modules:routes/legal
81+
* @inner
82+
*/
83+
router.get(['/privacy-pdf', '/privacy-policy-pdf', '/privacypolicy-pdf'], (req, res) => {
84+
res.download("./views/legal/privacy-pdf.pdf")
85+
});
86+
6587
/**
6688
* Route serving privacy policy archive
6789
* @name get/privacy

0 commit comments

Comments
 (0)