From 4099b3f77f296ff4f7a4336b105055a75efe0a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9luchu?= Date: Thu, 11 Mar 2021 17:24:56 +0100 Subject: [PATCH] v3.4.7 - Fixed access to deprecated version --- README.md | 2 +- package.json | 2 +- src/app.js | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 46a4134..e8212d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# **Aruppi API** (v3.4.6) +# **Aruppi API** (v3.4.7) > This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture > diff --git a/package.json b/package.json index b043dad..360c6c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aruppi", - "version": "3.4.6", + "version": "3.4.7", "description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app", "main": "./src/api/api.js", "scripts": { diff --git a/src/app.js b/src/app.js index 81e7394..092c783 100644 --- a/src/app.js +++ b/src/app.js @@ -39,8 +39,12 @@ app.get('/api/v1', (req, res) => { }); }); +app.get('/api/v2/*', (req, res) => { + res.redirect('/api/v2') +}); + + app.get('/api/v2', (req, res) => { - res.set('Cache-Control', 'no-cache,proxy-revalidate'); res.json({ message: 'Sorry, version v2 is not avaiable, if you want to see content go to v3' });