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

Commit a3c30d0

Browse files
Redirection fixes
Add redirections killed from python by fellow others...
1 parent 9b0c172 commit a3c30d0

File tree

7 files changed

+45
-21
lines changed

7 files changed

+45
-21
lines changed

src/routes/legal.js

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @date 16/11/2020
66
* @version 1.0.0
77
* @requires express
8-
*
8+
*
99
*/
1010

1111
/**
@@ -22,14 +22,33 @@ const config = require('../config/config');
2222
const router = express.Router();
2323

2424
/**
25-
* Route serving termsofservice
25+
* Route serving termsofservice
26+
* @name get/termsofservice
27+
* @function
28+
* @memberof modules:routes/legal
29+
* @inner
30+
*/
31+
router.get(['/tos', '/tac', '/termsofservice', '/terms-of-service'], (req, res) => {
32+
res.render('legal/tos.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
33+
});
34+
35+
/**
36+
* Route serving termsofservice archive
2637
* @name get/termsofservice
2738
* @function
2839
* @memberof modules:routes/legal
2940
* @inner
3041
*/
31-
router.get(['/tos', '/tac', '/termsofservice', '/terms-of-service'], (req, res) => {
32-
res.render('legal/tos.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
42+
router.get([
43+
'/tos/archive/:date',
44+
'/tac/archive/:date',
45+
'/termsofservice/archive/:date',
46+
'/terms-of-service/archive/:date'
47+
], (req, res) => {
48+
res.render(`legal/archive/tos-${req.params.date}.html`, {
49+
production: config.PRODUCTION,
50+
client_versobe: config.CLIENT_VERBOSE
51+
});
3352
});
3453

3554
/**
@@ -43,6 +62,17 @@ router.get(['/privacy', '/privacy-policy', '/privacypolicy'], (req, res) => {
4362
res.render('legal/privacy.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
4463
});
4564

65+
/**
66+
* Route serving privacy policy archive
67+
* @name get/privacy
68+
* @function
69+
* @memberof modules:routes/legal
70+
* @inner
71+
*/
72+
router.get(['/privacy/archive/:date', '/privacy-policy/archive/:date', '/privacypolicy/archive/:date'], (req, res) => {
73+
res.render(`legal/archive/privacy-${req.params.date}.html`, {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
74+
});
75+
4676
/**
4777
* Route serving licence
4878
* @name get/licence
@@ -54,4 +84,4 @@ router.get('/license', (req, res) => {
5484
res.render('legal/licence.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
5585
});
5686

57-
module.exports = router;
87+
module.exports = router;

src/views/legal/archive/privacy-20201117.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
{% block title %}CodeWe{% endblock %}
44

55
{% block head %}
6-
<<<<<<< HEAD:src/views/legal/privacy.html
76
<link rel="stylesheet" type="text/css" href="/css/legal.less">
8-
=======
9-
<link rel="stylesheet" type="text/css" href="/css/legal.less">
10-
>>>>>>> Legal:src/views/legal/archive/privacy-20201117.html
117
{% endblock %}
128

139
{% block corps %}
1410
<section>
1511
<h1>Privacy Policy for CodeWe</h1>
1612
<p id="not-valid">THESE POLICIES ARE NO LONGER VALID!</p>
17-
<a href="/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
13+
<a href="/legal/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
1814
<p>At CodeWe, accessible from https://codewe.bhasher.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by CodeWe and how we use it.</p>
1915

2016
<p>If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.</p>

src/views/legal/archive/privacy-20201120.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Privacy Policy</h1>
2323
</table>
2424

2525
<p id="not-valid">THESE POLICIES ARE NO LONGER VALID!</p>
26-
<a href="/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
26+
<a href="/legal/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
2727

2828
<p>
2929
<i>

src/views/legal/archive/tos-20201115.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
{% block title %}CodeWe{% endblock %}
44

55
{% block head %}
6-
<<<<<<< HEAD:src/views/legal/tos.html
76
<link rel="stylesheet" type="text/css" href="/css/legal.less">
8-
=======
9-
<link rel="stylesheet" type="text/css" href="/css/legal.less">
10-
>>>>>>> Legal:src/views/legal/archive/tos-20201115.html
117
{% endblock %}
128

139
{% block corps %}
1410
<section>
1511
<h1>Terms of Conditions</h1>
1612
<p>Last updated: November 06, 2020</p>
13+
<p id="not-valid">THESE TERMS ARE NO LONGER VALID!</p>
14+
<a href="/legal/tos"><p id="redirect">The current and valid version can be found here.</p></a>
1715
<p>Please read these terms and conditions carefully before using Our Service.</p>
1816
<h1>Interpretation and Definitions</h1>
1917
<h2>Interpretation</h2>

src/views/legal/archive/tos-20201117.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Terms of Service</h1>
2323
</tbody>
2424
</table>
2525
<p id="not-valid">THESE TERMS ARE NO LONGER VALID!</p>
26-
<a href="/tos"><p id="redirect">The current and valid version can be found here.</p></a>
26+
<a href="/legal/tos"><p id="redirect">The current and valid version can be found here.</p></a>
2727

2828
<br><br>
2929
<strong>Hello!</strong> We are happy to see You here at CodeWe!

src/views/legal/privacy.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>Privacy Policy</h1>
2424

2525
<p>
2626
<i>
27-
<a href="/privacy-pdf">
27+
<a href="/legal/privacy-pdf">
2828
A downloadable PDF version can be found here.
2929
</a>
3030
</i>
@@ -164,14 +164,14 @@ <h2>Revision History</h2>
164164
<tbody>
165165
<tr>
166166
<td>
167-
<a href="/privacy/archive/20201117">
167+
<a href="/legal/privacy/archive/20201117">
168168
Privacy Policy from November 06<sup>th</sup>, 2020 to November 20<sup>th</sup>, 2020
169169
</a>
170170
</td>
171171
</tr>
172172
<tr>
173173
<td>
174-
<a href="/privacy/archive/20201120">
174+
<a href="/legal/privacy/archive/20201120">
175175
Privacy Policy from November 20<sup>th</sup>, 2020 to November 23<sup>th</sup>, 2020
176176
</a>
177177
</td>

src/views/legal/tos.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@ <h2>Revision History</h2>
489489
<tbody>
490490
<tr>
491491
<td>
492-
<a href="/tos/archive/20201115">
492+
<a href="/legal/tos/archive/20201115">
493493
Terms of Service from November 6<sup>th</sup>, 2020 to November 15<sup>th</sup>, 2020
494494
</a>
495495
</td>
496496
</tr>
497497
<tr>
498498
<td>
499-
<a href="/tos/archive/20201117">
499+
<a href="/legal/tos/archive/20201117">
500500
Terms of Service from November 15<sup>th</sup>, 2020 to November 20<sup>th</sup>, 2020
501501
</a>
502502
</td>

0 commit comments

Comments
 (0)