chore: Support multiple term types

This commit is contained in:
Maksim Eltyshev
2026-02-10 22:53:22 +01:00
parent 1d0b3e9af8
commit 0db1a5cf0e
10 changed files with 96 additions and 26 deletions
+4 -1
View File
@@ -18,7 +18,10 @@ const LANGUAGES = ['de-DE', 'en-US'];
const DEFAULT_LANGUAGE = 'en-US';
const getContent = (language = DEFAULT_LANGUAGE) =>
fsPromises.readFile(`${sails.config.appPath}/terms/${language}.md`, 'utf8');
fsPromises.readFile(
`${sails.config.appPath}/terms/${sails.config.custom.termsType}/${language}.md`,
'utf8',
);
const hashContent = (content) => crypto.createHash('sha256').update(content).digest('hex');