Closed maximebeaudoin closed 4 years ago
First of all, thanks for contributing. This feature will also require at least two validations:
@ericzon I'll take a look. Do you know the best place to put this kind of validation ? By the way, when we create a intent, we can actually have duplicate intent name, even in the same domain so i'm not sure if it's a normal behavior or not.
@maximebeaudoin as this is a kind of validation that requires db communication, I suggest you to add this checking in server/feats/intent/intent.controller.js / updateById method. By the way, related with your last comment... no, it shouldn't allow to create an intent with the same name. If you want, add the same kind of validation in .... / add method
@ericzon I have added some kind of validation before saving. However, i'm not sure the best way to handle the 400 code into the UI. For now, it's return a Unknow api error
to the user and it's not the best for them.
Great @maximebeaudoin . I've checked the code and it looks good to me. Solve the conflicts and we'll merge it. With the current version, it'll show an error message of 'Bad request', is not perfect but I prefer to add your changes and we'll focus in these details after.
@ericzon Conflicts resolved
@ericzon Merging is coming soon ?
Pull Request Template
PR Checklist
npm test
locally and all tests are passing.PR Description
To be able to use the app properly we really need to be able to change intent name over time. This behavior is common in other NLU platform like Dialogflow and Watson.