16 lines
414 B
TypeScript
16 lines
414 B
TypeScript
// @ts-nocheck
|
|
import { queryEndpoint } from "../endpoint/endpoint-client.ts";
|
|
import { catalogMakerSql } from "../sql/catalog-maker.ts";
|
|
|
|
export async function listLanguages(config) {
|
|
const result = await queryEndpoint(config, catalogMakerSql.languages);
|
|
return {
|
|
...result,
|
|
items: result.items.map((row) => ({
|
|
id: row.id_lang,
|
|
name: row.name,
|
|
isoCode: row.iso_code,
|
|
})),
|
|
};
|
|
}
|