Cannot add respondToFormats within Compound
- Vorherrschende Sprache
- JavaScript
- Sterne
- 7
- Forks
- 5
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Unless I'm missing a place to call `require('kontroller').Helpers.respondToFormats.push('newformat');`, then there is an issue with the way the BaseController is bound to compound to allow additional formats to be pushed to it. I tried accessing `app.compound.controller` to see if I could make the call to the Helpers.respondToFormats there, but it only bound the functions, e.g. `respondTo`.
I guess for now I will go back to using the `switch(format)` technique.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Look at the BaseController binding in the compound integration, likely in the kontroller library's main entry point or a compound-specific adapter. The issue is that respondToFormats array is not exposed. Check how the controller is attached to app.compound.controller and see if the Helpers object is fully bound. Test by trying to push a new format and see if it's recognized in response handling.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- backend-api-design
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100