File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -405,14 +405,15 @@ class Controller {
405405 *
406406 * Functions called from the `afterAction` hook will have `request` and
407407 * `response` objects passed as arguments as well as a third `payload`
408- * arguments that is a reference to resolved data of the Controller action
409- * that was called within the current `request` / `response` cycle. If you
410- * return a value from a function added to the `afterAction` hook, that value
411- * will be used instead of the resolved data from the preceding Conroller
412- * action. Subsequent hooks called from an `afterAction` hook will will use
413- * the value returned or resolved from preceding hook. This makes
414- * `afterAction` a great place to modify the data you are sending back to the
415- * client.
408+ * argument. The `payload` argument is a reference to the resolved data of
409+ * the Controller action that was called within the current `request` /
410+ * `response` cycle. You need to explicitly return this `payload` in order for
411+ * the afterAction to resolve with it's data. If you return a modified value
412+ * from a function added to the `afterAction` hook, that value will be used
413+ * instead of the resolved data from the preceding Controller action.
414+ * Subsequent hooks called from an `afterAction` hook will will use the value
415+ * returned or resolved from the preceding hook. This makes `afterAction` a
416+ * great place to modify the data you are sending back to the client.
416417 *
417418 * **Example:**
418419 *
You can’t perform that action at this time.
0 commit comments