[api] GET /api/versions

This commit is contained in:
Avris 2021-08-28 16:34:30 +02:00
parent 4dc7d66125
commit 828ac10663
2 changed files with 12 additions and 0 deletions

View File

@ -78,6 +78,8 @@ app.use(async function (req, res, next) {
router.use(grant.express()(require('./social').config)); router.use(grant.express()(require('./social').config));
app.use(require('./routes/home').default);
app.use(require('./routes/banner').default); app.use(require('./routes/banner').default);
app.use(require('./routes/user').default); app.use(require('./routes/user').default);

10
server/routes/home.js Normal file
View File

@ -0,0 +1,10 @@
import { Router } from 'express';
import {buildLocaleList, handleErrorAsync} from "../../src/helpers";
const router = Router();
router.get('/versions', handleErrorAsync(async (req, res) => {
return res.json(buildLocaleList(global.config.locale));
}));
export default router;