mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
fix: esacpe mappin template filename
This commit is contained in:
committed by
Rainer Killinger
parent
4ac6987813
commit
496e6c5bd0
@@ -20,12 +20,13 @@ import {Client} from 'elasticsearch';
|
||||
import {existsSync, writeFileSync} from 'fs';
|
||||
import {readFile} from 'fs-extra';
|
||||
import {resolve} from 'path';
|
||||
import sanitize = require('sanitize-filename');
|
||||
import {configFile, coreVersion} from '../../common';
|
||||
|
||||
const dirPath = resolve('src', 'storage', 'elasticsearch', 'templates');
|
||||
const templatePath = resolve(dirPath, `template_${coreVersion}.json`);
|
||||
const errorPath = resolve(dirPath, `failed_template_${coreVersion}.json`);
|
||||
const errorReportPath = resolve(dirPath, `error_report_${coreVersion}.txt`);
|
||||
const templatePath = resolve(dirPath, sanitize(`template_${coreVersion}.json`, {replacement: '-'}));
|
||||
const errorPath = resolve(dirPath, sanitize(`failed_template_${coreVersion}.json`, {replacement: '-'}));
|
||||
const errorReportPath = resolve(dirPath, sanitize(`error_report_${coreVersion}.txt`, {replacement: '-'}));
|
||||
|
||||
/**
|
||||
* Check if the correct template exists
|
||||
|
||||
Reference in New Issue
Block a user