added google sheets
This commit is contained in:
parent
37ca207b92
commit
c4b06eb6c4
7 changed files with 304 additions and 28 deletions
|
|
@ -63,7 +63,6 @@ func parseOrder(r *http.Request) (order, error) {
|
|||
if total < 500 {
|
||||
errorList = append(errorList, fmt.Errorf("Minimalna wartość zamówienia wynosi 50zł"))
|
||||
}
|
||||
o.id = newOrderID()
|
||||
return o, errors.Join(errorList...)
|
||||
}
|
||||
|
||||
|
|
@ -79,5 +78,10 @@ func OrderHandler(w http.ResponseWriter, r *http.Request) {
|
|||
writeErrors(w, r, http.StatusUnprocessableEntity, errorMessages(err)...)
|
||||
return
|
||||
}
|
||||
o.id, err = insertPending(o)
|
||||
if err != nil {
|
||||
log.Println("ORDER_SHEETS_ERROR", err)
|
||||
o.id = newOrderID()
|
||||
}
|
||||
startCheckout(w, r, o)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue