use list pattern when listing
This commit is contained in:
@@ -13,7 +13,7 @@ exports = module.exports = {
|
||||
|
||||
getPlatformStatus,
|
||||
|
||||
getLanguages,
|
||||
listLanguages,
|
||||
getLanguage,
|
||||
setLanguage,
|
||||
|
||||
@@ -157,8 +157,8 @@ async function prepareDashboardDomain(req, res, next) {
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
async function getLanguages(req, res, next) {
|
||||
const [error, languages] = await safe(translation.getLanguages());
|
||||
async function listLanguages(req, res, next) {
|
||||
const [error, languages] = await safe(translation.listLanguages());
|
||||
if (error) return next(new BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { languages }));
|
||||
|
||||
Reference in New Issue
Block a user