Completed db rewrite
This commit is contained in:
parent
54d7d14ef9
commit
cf4b8e0119
19 changed files with 481 additions and 276 deletions
|
|
@ -12,17 +12,16 @@ import (
|
|||
func main() {
|
||||
fmt.Println("Opening database db.sqlite")
|
||||
|
||||
orm := bootstrapDatabase()
|
||||
db := bootstrapDatabase()
|
||||
|
||||
if orm == nil {
|
||||
if db == nil {
|
||||
log.Fatal("Failed to init database")
|
||||
return
|
||||
}
|
||||
|
||||
db, _ := orm.DB()
|
||||
defer db.Close()
|
||||
|
||||
r := gin.Default()
|
||||
apis.BindAPIs(r, orm)
|
||||
apis.BindAPIs(r, db)
|
||||
r.Run()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue