@tiledesk/tiledesk-server 2.13.23 → 2.13.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/routes/faq_kb.js +5 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/routes/faq_kb.js
CHANGED
|
@@ -681,8 +681,9 @@ router.post('/fork/:id_faq_kb', roleChecker.hasRole('admin'), async (req, res) =
|
|
|
681
681
|
|
|
682
682
|
chatbot.template = "empty";
|
|
683
683
|
|
|
684
|
+
let savedChatbot
|
|
684
685
|
try {
|
|
685
|
-
|
|
686
|
+
savedChatbot = await cs.createBot(api_url, token, chatbot, landing_project_id);
|
|
686
687
|
winston.debug("savedChatbot: ", savedChatbot)
|
|
687
688
|
} catch(err) {
|
|
688
689
|
winston.error("Error creating new chatbot: ", err);
|
|
@@ -692,9 +693,10 @@ router.post('/fork/:id_faq_kb', roleChecker.hasRole('admin'), async (req, res) =
|
|
|
692
693
|
if (!savedChatbot) {
|
|
693
694
|
return res.status(500).send({ success: false, message: "Unable to create new chatbot" });
|
|
694
695
|
}
|
|
695
|
-
|
|
696
|
+
|
|
697
|
+
let import_result
|
|
696
698
|
try {
|
|
697
|
-
|
|
699
|
+
import_result = await cs.importFaqs(api_url, savedChatbot._id, token, chatbot, landing_project_id);
|
|
698
700
|
winston.debug("imported: ", import_result);
|
|
699
701
|
} catch(err) {
|
|
700
702
|
winston.error("Error importing intents on new chatbot: ", err);
|