Skip to content
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

check unique is not working with mongodb #133

Closed
alidplus opened this issue Jan 1, 2020 · 2 comments
Closed

check unique is not working with mongodb #133

alidplus opened this issue Jan 1, 2020 · 2 comments
Labels
Awaiting response Will close soon Will be closed soon without further input

Comments

@alidplus
Copy link

alidplus commented Jan 1, 2020

when comparing a string (ownId) with a objectId (mongodb id) in the:
https://github.com/feathers-plus/feathers-authentication-management/blob/95e5801229adba72b69e2bc7a9eb507b280db8bc/src/check-unique.js#L27
items[0][usersServiceIdName] is not equal in type with ownId

@claustres
Copy link
Collaborator

Could you provide a use case or code sample ? This hook is expected to be called on the client side so that all values are strings, eg as a before create hook on the user service.

@claustres claustres added Awaiting response Will close soon Will be closed soon without further input labels Jun 3, 2020
@claustres
Copy link
Collaborator

This operation is expected to be called on the front side so that you should not have an ObjectId but a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting response Will close soon Will be closed soon without further input
Projects
None yet
Development

No branches or pull requests

2 participants