I have wrote an API to get user details. I am using Adonis validator to check if Id exists in the DB before it gets into controller to fetch rest details.
Below is my validator code
I am keep getting an error "Exists validation failed on Id" however when I checked into the DB the id and user details are there.
this issue is not consistent with other user and ids. It is for few of them only.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have wrote an API to get user details. I am using Adonis validator to check if Id exists in the DB before it gets into controller to fetch rest details. Below is my validator code
get rules() { return { id: required|number|exists:users,id, role: in:MA,FA,TR,CU }; }
I am keep getting an error "Exists validation failed on Id" however when I checked into the DB the id and user details are there. this issue is not consistent with other user and ids. It is for few of them only.
below are adonis dependencies, I am using,
"@adonisjs/ace": "^5.0.8", "@adonisjs/ally": "^2.1.3", "@adonisjs/antl": "^2.1.0", "@adonisjs/auth": "^3.1.0", "@adonisjs/bodyparser": "2.0.9", "@adonisjs/cli": "^4.0.12", "@adonisjs/cors": "^1.0.7", "@adonisjs/drive": "^1.0.4", "@adonisjs/fold": "^4.0.9", "@adonisjs/framework": "^5.0.9", "@adonisjs/ignitor": "^2.0.8", "@adonisjs/lucid": "^6.1.3", "@adonisjs/mail": "^3.0.9", "@adonisjs/redis": "^2.0.7", "@adonisjs/session": "^1.0.27", "@adonisjs/shield": "^1.0.8", "@adonisjs/validator": "^5.0.6", "@adonisjs/vow": "^1.0.17", "@adonisjs/websocket": "^1.0.12",