1602 / 1602/kontroller

Cannot add respondToFormats within Compound

Ouverte
#8 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
7
Forks
5
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
backend-api-design
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.