-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route for checking duplicate vocabs #91
Comments
@luwol03 I have updated the route response |
what about making groupId and languagePackagId optional and have one controller handler? |
Yeah this was my intention I tried to explain here
Or did you think of something else |
oh ok. And what is with the third case without any parameters? |
I don't know if not parameters make that much sense. No parameters would mean that it checks in every group and package. But I think you only need this function to check a specific package, not all your packages |
I was thinking of showing that this vocab already exists in package XXX group XXX |
@luwol03 I have added a vocab parameter to the route, as it is a GET. Would you agree with this? |
What should this be for? And I would also respond with the found vocab so you can show it in the create anyway dialog. |
Yeah understand what you mean. But when you create a new package you usually don't care if a vocab you want to add is already existing in another package, as it is completely new and created for another learning purpose. I think a global check would be unnecessary and disturbing |
The Yeah you could add the found vocab I'm the response. But you could just use the foreign word of the input field in the client that is saved there anyways |
We need a route to checki if vocab already exists in groups/packages when creating them. The check only has do be done client-side, so no additional checking in the vocab creation functions.
Needed Routes:
/api/check-duplicate?languagePackageId={languagePackageId}&vocab={vocab}
Response:
/api/check-duplicate?groupId={groupId}&vocab={vocab}
Response:
For a better overview I have split up the two needed cases. But overall there is only one endpoint, where you can give your needed query parameters to get the result. This includes adding groupId and packageId in one query too (although this is a bit useless).
The text was updated successfully, but these errors were encountered: