africas-talking #50
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Activity
Doing
Activity
Proposal
Activity
QA
Activity
Validate
Runner
AT
Runner
CLI
Runner
HTTP
Runner
SSH
cleanup
devops
documentation
easypeasy
exchange
i18n
l8ter
legacy
meta
migration
optimization
privilege
refactor
smell
support
tooling
ux
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: urdt/ussd#50
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "africas-talking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adding Africa's Taking (AT) specific functionality
@ -0,0 +232,4 @@
rp := &atRequestParser{}
bsh := handlers.NewBaseSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl)
sh := httpserver.ToSessionHandler(bsh, httpserver.WithAtOutput())
In general, chainable functions should be called ON the object instead of being an argument TO The object.
@ -192,2 +194,3 @@
//sh := httpserver.NewSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl.Init)
sh := httpserver.NewSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl)
bsh := handlers.NewBaseSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl)
sh := httpserver.ToSessionHandler(bsh)
In fact, I should have implemented this as chainable, too. My bad.
@ -0,0 +1,123 @@
package handlers
It would be better to have this PR against my async branch, because here we cannot see the differences....
I've updated the PR to reflect this
@ -0,0 +90,4 @@
return rqs, err
}
func (f *BaseSessionHandler) AtOutput(rqs RequestSession) (RequestSession, error) {
This method should not exist in the base handler. Please EXTEND the handler to adapt it to your needs.
In fact, you probably need to extend the internal/http/server.go SessionHandler instead, since it in turn extends this, and also provides other functionality you need.
BaseSessionHandler -> http.SessionHandler -> at.SessionHandler
@ -133,3 +127,1 @@
if err != nil {
f.writeError(w, 500, "Write result fail", err)
return
if f.useAtOutput {
Similary here, Please do not put AT speicifc code in the generic http code. Please use your own extension of the class.
WIP: africas-talkingto africas-talking