add receipt page for plan

This commit is contained in:
2024-08-12 19:23:44 +02:00
parent 5ab6ad85f7
commit 48098ba817
3 changed files with 13 additions and 2 deletions

View File

@ -277,3 +277,9 @@ func (app *application) BronzePlan(w http.ResponseWriter, r *http.Request) {
app.errorLog.Println(err)
}
}
func (app *application) BronzePlanReceipt(w http.ResponseWriter, r *http.Request) {
if err := app.renderTemplate(w, r, "receipt-plan", &templateData{}); err != nil {
app.errorLog.Println(err)
}
}

View File

@ -20,6 +20,7 @@ func (app *application) routes() http.Handler {
mux.Post("/payment-succeeded", app.PaymentSucceeded)
mux.Get("/plans/bronze", app.BronzePlan)
mux.Get("/receipt/bronze", app.BronzePlanReceipt)
fileServer := http.FileServer(http.Dir("./static"))
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))