mirror of
https://github.com/acaloiaro/frm
synced 2026-07-21 10:12:23 +00:00
feat: give users submission feedback
This commit is contained in:
parent
a44d713a99
commit
4f4a2fa6aa
2 changed files with 1 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"slices"
|
"slices"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/acaloiaro/frm"
|
"github.com/acaloiaro/frm"
|
||||||
"github.com/acaloiaro/frm/internal"
|
"github.com/acaloiaro/frm/internal"
|
||||||
|
|
@ -164,7 +163,6 @@ func Collect(w http.ResponseWriter, r *http.Request) {
|
||||||
slog.Error("[collector] unable to execute submission receiver", "error", err)
|
slog.Error("[collector] unable to execute submission receiver", "error", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(3 * time.Second)
|
|
||||||
err = collector.ThankYou().Render(ctx, w)
|
err = collector.ThankYou().Render(ctx, w)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("[collector] unable to render thank you page", "error", err)
|
slog.Error("[collector] unable to render thank you page", "error", err)
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ func getPool(ctx context.Context, args DBArgs) (p *pgxpool.Pool, err error) {
|
||||||
func Q(ctx context.Context, args DBArgs) *Queries {
|
func Q(ctx context.Context, args DBArgs) *Queries {
|
||||||
p, err := getPool(ctx, args)
|
p, err := getPool(ctx, args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("unable to get database connect", "error", err)
|
slog.Error("[frm] unable to get database connection", "error", err)
|
||||||
return New(&NoopDBTX{})
|
return New(&NoopDBTX{})
|
||||||
}
|
}
|
||||||
return New(p)
|
return New(p)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue