fix: format
This commit is contained in:
parent
5da0720a08
commit
887787de05
8 changed files with 107 additions and 41 deletions
|
@ -3,7 +3,7 @@ import path from 'path';
|
|||
import yaml from 'js-yaml';
|
||||
import { Request, Response } from 'express';
|
||||
import { themes } from '../data/themes.js';
|
||||
import {FALLBACK_LANG} from "../config";
|
||||
import { FALLBACK_LANG } from '../config';
|
||||
|
||||
interface Translations {
|
||||
curricula_page: {
|
||||
|
@ -27,7 +27,8 @@ function loadTranslations(language: string): Translations {
|
|||
}
|
||||
|
||||
export function getThemes(req: Request, res: Response) {
|
||||
const language = (req.query.language as string)?.toLowerCase() || FALLBACK_LANG;
|
||||
const language =
|
||||
(req.query.language as string)?.toLowerCase() || FALLBACK_LANG;
|
||||
const translations = loadTranslations(language);
|
||||
|
||||
const themeList = themes.map((theme) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue