CodeForPhilly / CodeForPhilly/stately
Initiate action should/could be specified in URL
- 主要语言
- Python
- 星标
- 22
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
描述
The way the client is designed, it gets the workflow definition from `GET /api/travel-request/`. If there's an `id` property, it renders the `data` and the `events`. If there's multiple `state.actions`, it renders action buttons. If there's only 1 `state.actions`, it renders the form for it. If there's more than 1 `state.actions`, it waits until you select one of the action buttons, and renders that form. On submission, the form posts to `POST /api/travel-request//?token=xx`.
At the moment, this fails on the initiate action, I think because by design we expected clients to not include the action on the initiate `POST`. But it's actually pretty simple to do that since (a) we're providing the name of the action in the response to their `GET` request, and (b) they're already using part of that response for their `POST` request (the template).
My guess is you probably added extra logic to identify what the default action was. Perhaps this isn't necessary, and we can just expect clients to include the action name in every `POST` request.
Thoughts @mjumbewu ?
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先跟踪从 GET /api/travel-request/ 到 POST URL 的客户端流程,然后检查在构建该 URL 时如何处理 initiate action。在进行任何更改之前,先通过 issue 讨论确认预期行为。完成的标准是 POST 请求始终一致地包含 action slug,包括 initiation,并且生成的 action 表单提交能够正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100