[api] GET /api/versions
This commit is contained in:
parent
4dc7d66125
commit
828ac10663
|
@ -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);
|
||||||
|
|
|
@ -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;
|
Reference in New Issue