CodeForPhilly / CodeForPhilly/stately

Initiate action should/could be specified in URL

Đang mở
#17 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
discussion
Ngôn ngữ chính
Python
Star
22
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 ?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by tracing the client flow from GET /api/travel-request/ to the POST URL, then inspect how the initiate action is handled when building that URL. Confirm the intended behavior with the issue discussion before changing anything. Done means POST requests include the action slug consistently, including initiation, and the resulting action form submission works.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.