DB konstant als ersten Funktionsparameter gesetzt
This commit is contained in:
@ -11,7 +11,7 @@ import (
|
||||
"streifling.com/jason/sicherheitsunterweisung/packages/data"
|
||||
)
|
||||
|
||||
func HandleInternalLogin(ss *[]*Session, cs chan<- *Session, db *data.DB) http.HandlerFunc {
|
||||
func HandleInternalLogin(db *data.DB, ss *[]*Session, cs chan<- *Session) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
instructors, err := db.GetInstructors()
|
||||
if err != nil {
|
||||
@ -112,7 +112,7 @@ func HandleExternalLogin(ss *[]*Session) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Session) HandleParticipant(p *data.Participant, sq *[]data.Question, db *data.DB) http.HandlerFunc {
|
||||
func (s *Session) HandleParticipant(db *data.DB, p *data.Participant, sq *[]data.Question) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
p.FirstName = r.PostFormValue("first-" + fmt.Sprint(p.Login))
|
||||
p.LastName = r.PostFormValue("last-" + fmt.Sprint(p.Login))
|
||||
|
Reference in New Issue
Block a user