i need to use one promise to retrieve some data before continue with the logical of my code.
The thing ins i try to use this:
if (label === 'edit') {
new skill_watson_export_no_append(jsonSkillIntentsUpdate, id_skill_tst).update_skill_no_append(jsonSkillIntentsUpdate, id_skill_tst)
} else {
new skill_watson_export(new_intent_preprocess, id_skill_tst).update_skill_append(new_intent_preprocess, id_skill_tst)
}.then(response_watson => {
but i have an error 'Declaration or statment expected'
i need to use one of this promises before continue, if not the only way is to repeat 200 lines of code. Someone help me....? thanks