mirror of
https://github.com/woodchen-ink/aimodels-prices.git
synced 2025-07-18 21:51:59 +08:00
15 lines
197 B
Go
15 lines
197 B
Go
package middleware
|
|
|
|
import (
|
|
"aimodels-prices/database"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Database() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
c.Set("db", database.DB)
|
|
c.Next()
|
|
}
|
|
}
|