Skip to content

Commit

Permalink
Merge pull request #87 from daveteu/master
Browse files Browse the repository at this point in the history
Add note on CopyString
  • Loading branch information
ReneWerner87 authored Sep 27, 2022
2 parents 2e3875e + 52c2687 commit 8977118
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8977118

Please sign in to comment.