mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
fix: Impliment redirect for /static/api -> /apidoc
This commit is contained in:
@@ -48,6 +48,15 @@ _.each(staticPages, (name) => {
|
||||
};
|
||||
});
|
||||
|
||||
api.redirectApi = {
|
||||
method: 'GET',
|
||||
url: '/static/api',
|
||||
runCron: false,
|
||||
async handler (req, res) {
|
||||
res.redirect(301, '/apidoc');
|
||||
},
|
||||
};
|
||||
|
||||
let shareables = ['level-up', 'hatch-pet', 'raise-pet', 'unlock-quest', 'won-challenge', 'achievement'];
|
||||
|
||||
_.each(shareables, (name) => {
|
||||
|
||||
Reference in New Issue
Block a user