Remove obsolete sanitizing of prompts

This commit is contained in:
maver 2023-06-01 18:52:04 +02:00
parent ce7759e12f
commit 24acba557c
1 changed files with 0 additions and 9 deletions

View File

@ -276,15 +276,6 @@ PromptManagerModule.prototype.addPrompt = function (prompt, identifier) {
PromptManagerModule.prototype.sanitizeServiceSettings = function () { PromptManagerModule.prototype.sanitizeServiceSettings = function () {
this.serviceSettings.prompts.forEach((prompt => prompt.identifier = prompt.identifier || this.getUuidv4())); this.serviceSettings.prompts.forEach((prompt => prompt.identifier = prompt.identifier || this.getUuidv4()));
const hasFaultyPositions = this.serviceSettings.prompts.some((prompt => prompt.position));
if (hasFaultyPositions) {
this.serviceSettings.prompts.sort((a, b) => (a.identifier > b.identifier) ? 1 : -1);
for (let i = 0; i < this.serviceSettings.prompts.length; i++) {
this.serviceSettings.prompts[i].position = String(i + 1);
}
}
// TODO: // TODO:
// Sanitize data // Sanitize data
}; };