From 4a67610ba3a5beb6cd5277a88c5f51b0a6b584a8 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Wed, 10 Sep 2025 10:49:31 -0400 Subject: [PATCH] Fix up the Exec function so it returns the result. That lets me get the ID of last insert. --- api/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handlers.go b/api/handlers.go index fbad33b..d2c9596 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -34,7 +34,7 @@ func PostApiRegister(c *fiber.Ctx) error { Columns("username", "email", "password"). Values(user.Username, user.Email, user.Password).ToSql() - err = data.Exec(err, sql, args...) + _, err = data.Exec(err, sql, args...) if err != nil { return IfErrNil(err, c) } return c.Redirect("/login/")