feat: move db gen out, emit json field
This commit is contained in:
1 parent
e770b31402
commit
7ced3985b1
15 files changed
+63
-90
No files matched your search
+3
-1
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/jackc/pgx/v5"
|
||||
|
||||
"tutorial.sqlc.dev/app/internal/author"
|
||||
"tutorial.sqlc.dev/app/internal/db"
|
||||
)
|
||||
|
||||
func run() error {
|
||||
@@ -19,8 +20,9 @@ func run() error {
|
||||
}
|
||||
defer conn.Close(ctx)
|
||||
|
||||
querier := db.New(conn)
|
||||
r := gin.Default()
|
||||
authorCtl := author.NewController(conn)
|
||||
authorCtl := author.NewController(querier)
|
||||
author.Register(r, &authorCtl)
|
||||
|
||||
r.Run(":8000")
|
||||
|
||||
Reference in new issue
Block a user