Closed Dauniusha closed 6 months ago
As I understand, there is just a problem with parsing Fastify request by AdminJs router. As a result we've got
payload: { targetId: undefined }
object after Fastify route handler and broken request in the plugin hook as well.
What happened?
I've tried to link existing record in M:N relation, but I've got 500 error. In my case request was: query: http://localhost:4000/admin/api/resources/products/records/5618be40-68d8-4fa0-a1b6-454976baeb29/addManyToManyRelation?relation=occasions body:
{ "targetId": "79c8f408-6e46-4612-ab75-1fd1feacc41d" }
Bug prevalence
Permanently
AdminJS dependencies version
"dependencies": { "@adminjs/design-system": "^4.0.3", "@adminjs/fastify": "^4.0.1", "@adminjs/relations": "^1.0.0", "@adminjs/sql": "^2.2.1", "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/lib-storage": "^3.476.0", "@fastify/session": "^10.5.0", "adminjs": "^7.3.1", "connect-pg-simple": "^9.0.1", "env-cmd": "^10.1.0", "fastify": "^4.24.3", "tslib": "^2.6.2" }, "devDependencies": { "@types/connect-pg-simple": "^7.0.3" },
What browsers do you see the problem on?
Chrome
Relevant log output
Relevant code that's giving you issues