Skip to content

Commit

Permalink
fix: db
Browse files Browse the repository at this point in the history
  • Loading branch information
nponsard committed Mar 20, 2024
1 parent f4347b0 commit 90b0aef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions routes/controller.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package routes

import "gorm.io/gorm"

type Controller struct {
DB *gorm.DB
}
2 changes: 1 addition & 1 deletion routes/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func GetRoutes(db *gorm.DB) *gin.Engine {

router := gin.Default()

controller := Controller{}
controller := Controller{DB: db}

router.POST("/user", controller.createUser)

Expand Down

0 comments on commit 90b0aef

Please sign in to comment.