forgot to stage
This commit is contained in:
@@ -22,14 +22,14 @@ func CreateSyndicateHandler(db *sql.DB) http.HandlerFunc {
|
||||
name := r.FormValue("name")
|
||||
description := r.FormValue("description")
|
||||
|
||||
userID, ok := helpers.GetCurrentUserID(r)
|
||||
userId, ok := helpers.GetCurrentUserID(r)
|
||||
if !ok || name == "" {
|
||||
helpers.SetFlash(w, r, "Invalid data submitted")
|
||||
http.Redirect(w, r, "/account/syndicates/create", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
err := storage.CreateSyndicate(db, name, description, userID)
|
||||
_, err := storage.CreateSyndicate(db, userId, name, description)
|
||||
if err != nil {
|
||||
helpers.SetFlash(w, r, "Failed to create syndicate")
|
||||
} else {
|
||||
@@ -178,8 +178,6 @@ func SyndicateLogTicketHandler(db *sql.DB) http.HandlerFunc {
|
||||
drawDate := r.FormValue("draw_date")
|
||||
method := r.FormValue("purchase_method")
|
||||
|
||||
balls := helpers.ParseBallFields(r, gameType)
|
||||
|
||||
err := storage.InsertTicket(db, models.Ticket{
|
||||
UserId: userID,
|
||||
GameType: gameType,
|
||||
|
||||
Reference in New Issue
Block a user