You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/backend/api/locales.js

25 lines
473 B

/**
* Locales API Routes
*/
async function routes (app, options) {
app.get('/', {
schema: {
summary: 'List all locales',
tags: ['Locales']
}
}, async (req, reply) => {
return WIKI.models.locales.getLocales()
})
app.get('/:code/strings', {
schema: {
summary: 'Get locale strings',
tags: ['Locales']
}
}, async (req, reply) => {
return WIKI.models.locales.getStrings(req.params.code)
})
}
export default routes