Add database and post service to app contexts
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
package internal
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"CatsOfMastodonBotGo/internal/services"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
type AppContext struct {
|
||||
Db *gorm.DB
|
||||
PostService *services.PostService
|
||||
}
|
@@ -1,7 +1,12 @@
|
||||
package internal
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AppWebContext struct {
|
||||
Db *gorm.DB
|
||||
GinEngine *gin.Engine
|
||||
|
||||
}
|
Reference in New Issue
Block a user