1602 / 1602/kontroller

Cannot add respondToFormats within Compound

オープン
#8 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
7
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
backend-api-design
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。