From 52c268799a80c5d0397191c8b9ef2af1358ddf5e Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 28 Sep 2022 00:16:22 +0800 Subject: [PATCH] Update handlers.go --- handlers/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/handlers.go b/handlers/handlers.go index 0990506..90cfa22 100644 --- a/handlers/handlers.go +++ b/handlers/handlers.go @@ -21,6 +21,8 @@ func UserList(c *fiber.Ctx) error { // UserCreate registers a user func UserCreate(c *fiber.Ctx) error { user := &models.User{ + // Note: when writing to external database, + // we can simply use - Name: c.FormValue("user") Name: utils.CopyString(c.FormValue("user")), } database.Insert(user)