polish
This commit is contained in:
parent
6963a88602
commit
e7570a4c20
11 changed files with 138 additions and 5 deletions
4
main.go
4
main.go
|
|
@ -18,6 +18,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tdewolff/minify/v2"
|
||||
mcss "github.com/tdewolff/minify/v2/css"
|
||||
|
|
@ -130,6 +131,7 @@ func generateHTML() {
|
|||
saveFile(`kawiarnia`, html.Kawiarnia())
|
||||
// saveFile(`swieta`, html.Swieta(data.Swieta))
|
||||
saveFile(`wyroby`, html.Wyroby(data.Cakes, "wyroby"))
|
||||
saveFile(`dziekujemy`, html.Dziekujemy())
|
||||
saveFile(`wyroby/deserki`, html.Wyroby(data.Desserts, "wyroby/deserki"))
|
||||
saveFile(`wyroby/torty`, html.WyrobyTorty())
|
||||
saveFile(`wyroby/slodkie_stoly`, html.WyrobySlodkieStoly())
|
||||
|
|
@ -213,7 +215,7 @@ func main() {
|
|||
mux := http.ServeMux{}
|
||||
|
||||
mux.Handle("/", http.FileServer(http.Dir("www")))
|
||||
mux.HandleFunc("POST /order/", orders.OrderHandler)
|
||||
mux.Handle("POST /order", orders.Limit(http.HandlerFunc(orders.OrderHandler), 10*time.Second, 5))
|
||||
mux.HandleFunc("POST /webhook", orders.WebhookHandler(os.Getenv("STRIPE_WEBHOOK_SECRET")))
|
||||
|
||||
log.Println("listening on :8000")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue