mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
20 lines
515 B
JavaScript
20 lines
515 B
JavaScript
import { serveClient } from '../../libs/client';
|
|
|
|
const api = {};
|
|
|
|
// All requests to /new_app (except /new_app/static) should serve the new client in development
|
|
// if (IS_PROD && IS_NEW_CLIENT_ENABLED) {
|
|
|
|
// All the routes (except for the api and payments routes) serve the new client side
|
|
// The code that does it can be found in /middlewares/notFound.js
|
|
api.getNewClient = {
|
|
method: 'GET',
|
|
url: '/',
|
|
noLanguage: true,
|
|
async handler (req, res) {
|
|
return serveClient(res);
|
|
},
|
|
};
|
|
|
|
export default api;
|