SoftwareBrothers / adminjs-hapijs

Hapijs integration for AdminJS
MIT License
20 stars 12 forks source link

[BUGFIX] Do not restrict payload to multipart for POST actions. #72

Closed HEYGUL closed 1 year ago

HEYGUL commented 1 year ago

This bug has been spotted using hapijs, adminjs-hapijs and @adminjs/import-export plugins. When doing so, the export feature of @adminjs/import-export fails with 415 status code.

After investigation, it appears that adminjs-hapijs restricts payload format for POST routes to multipart.

While this works well for classic CRUD actions, it does not work for every custom POST actions.

With this PR, the restriction about payload being multipart is removed.

HEYGUL commented 1 year ago

I am closing it as import is now failing. A more complex solution has to be implemented.